-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from mauritssilvis/html_darts_tables
Add HTML darts checkout tables
- Loading branch information
Showing
31 changed files
with
31,690 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh | ||
|
||
# Check project identifier | ||
if [ $# -eq 0 ] || [ "${1}" = "" ]; then | ||
echo "Error: No project identifier supplied." | ||
exit | ||
fi | ||
|
||
id=${1} | ||
|
||
if [ ! -f "${id}-properties" ]; then | ||
echo "Error: No properties found for project identifier ${id}." | ||
exit | ||
fi | ||
|
||
# Check version | ||
if [ $# -eq 0 ] || [ "${2}" = "" ]; then | ||
echo "Error: No version supplied." | ||
exit | ||
fi | ||
|
||
version=${2} | ||
|
||
# Check branch | ||
branch=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
if [ "${branch}" != "main" ]; then | ||
echo "Error: Not on main branch." | ||
exit | ||
fi | ||
|
||
# Get properties | ||
# shellcheck source=java-darts-properties | ||
. "./${id}-properties" | ||
|
||
# Tag | ||
for i in "${!names[@]}"; do | ||
message="${name_prefix} ${names[i]} ${version}" | ||
tag="${label_prefix}-${labels[i]}-${version}" | ||
git tag -am "${message}" "${tag}" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/bin/sh | ||
|
||
# Check project identifier | ||
if [ $# -eq 0 ] || [ "${1}" = "" ]; then | ||
echo "Error: No project identifier supplied." | ||
exit | ||
fi | ||
|
||
id=${1} | ||
|
||
if [ ! -f "${id}-properties" ]; then | ||
echo "Error: No properties found for project identifier ${id}." | ||
exit | ||
fi | ||
|
||
# Check version | ||
if [ $# -eq 0 ] || [ "${2}" = "" ]; then | ||
echo "Error: No version supplied." | ||
exit | ||
fi | ||
|
||
version=${2} | ||
|
||
# Check branch | ||
branch=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
if [ "${branch}" != "main" ]; then | ||
echo "Warning: Not on main branch." | ||
fi | ||
|
||
# Get properties | ||
# shellcheck source=java-darts-properties | ||
. "./${id}-properties" | ||
|
||
# Clone repository | ||
cd .. | ||
git clone . "../darts-${version}" 2>/dev/null | ||
cd "../darts-${version}" || exit | ||
|
||
# Clean up | ||
rm -rf .git | ||
rm -rf scripts | ||
find . -maxdepth 1 -name "*.md" -delete | ||
|
||
for i in "${!other_files[@]}"; do | ||
other_path="${other_files[i]}" | ||
rm -rf "${other_path}" | ||
done | ||
|
||
# Zip | ||
echo -n "" > "zip.log" | ||
|
||
for i in "${!labels[@]}"; do | ||
label="${labels[i]}" | ||
project="${label_prefix}-${label}" | ||
path="${label}/${project}" | ||
file="${project}-${version}" | ||
|
||
mv "${path}" "${project}" 2>/dev/null | ||
rm -rf "${label}" | ||
rm -rf "${project}/.idea" | ||
|
||
# .tar.gz | ||
rm -f "${file}.tar.gz" | ||
7z a "${file}.tar" "./${project}/*" >> "zip.log" 2>> "zip.log" | ||
7z a -mx9 "${file}.tar.gz" "${file}.tar" >> "zip.log" 2>> "zip.log" | ||
rm -f "${file}.tar" | ||
|
||
# .zip | ||
rm -f "${file}.zip" | ||
7z a -mx9 "${file}.zip" "./${project}/*" >> "zip.log" 2>> "zip.log" | ||
done | ||
|
||
# Check zip | ||
archives=$(grep "Everything is Ok" zip.log -c) | ||
|
||
if [ "${archives}" -ne $((${#labels[@]} * 3)) ]; then | ||
echo "Error: Not all archives were created successfully." | ||
exit | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
|
||
# Project names | ||
name_prefix="HTML darts" | ||
|
||
names=( | ||
"tables" | ||
) | ||
|
||
# Project labels | ||
label_prefix="html-darts" | ||
|
||
labels=( | ||
"tables" | ||
) | ||
|
||
# Other files | ||
other_files=( | ||
"api" | ||
"cli" | ||
"core" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
# Set project identifier | ||
id="html-darts-tables" | ||
|
||
# Tag | ||
./do-tag "${id}" "${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
# Set project identifier | ||
id="html-darts-tables" | ||
|
||
# Zip | ||
./do-zip "${id}" "${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,8 @@ labels=( | |
"core" | ||
"cli" | ||
) | ||
|
||
# Other files | ||
other_files=( | ||
"tables" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,7 @@ | ||
#!/bin/sh | ||
|
||
# Check version | ||
if [ $# -eq 0 ]; then | ||
echo "Error: No version supplied." | ||
exit | ||
fi | ||
|
||
version=${1} | ||
|
||
# Check branch | ||
branch=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
if [ "${branch}" != "main" ]; then | ||
echo "Error: Not on main branch." | ||
exit | ||
fi | ||
|
||
# Get properties | ||
. ./java-darts-properties | ||
# Set project identifier | ||
id="java-darts" | ||
|
||
# Tag | ||
for i in "${!names[@]}"; do | ||
message="${name_prefix} ${names[i]} ${version}" | ||
tag="${label_prefix}-${labels[i]}-${version}" | ||
git tag -am "${message}" "${tag}" | ||
done | ||
./do-tag "${id}" "${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,7 @@ | ||
#!/bin/sh | ||
|
||
# Check version | ||
if [ $# -eq 0 ]; then | ||
echo "Error: No version supplied." | ||
exit | ||
fi | ||
|
||
version=${1} | ||
|
||
# Check branch | ||
branch=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
if [ "${branch}" != "main" ]; then | ||
echo "Warning: Not on main branch." | ||
fi | ||
|
||
# Get properties | ||
. ./java-darts-properties | ||
|
||
# Clone repository | ||
cd .. | ||
git clone . "../darts-${version}" 2>/dev/null | ||
cd "../darts-${version}" || exit | ||
|
||
# Clean up | ||
rm -rf .git | ||
rm -rf scripts | ||
rm -rf tables | ||
find . -maxdepth 1 -name "*.md" -delete | ||
# Set project identifier | ||
id="java-darts" | ||
|
||
# Zip | ||
echo -n "" > "zip.log" | ||
|
||
for i in "${!labels[@]}"; do | ||
label="${labels[i]}" | ||
project="${label_prefix}-${label}" | ||
path="${label}/${project}" | ||
file="${project}-${version}" | ||
|
||
mv "${path}" "${project}" 2>/dev/null | ||
rm -rf "${label}" | ||
rm -rf "${project}/.idea" | ||
|
||
# .tar.gz | ||
rm -f "${file}.tar.gz" | ||
7z a "${file}.tar" "./${project}/*" >> "zip.log" 2>> "zip.log" | ||
7z a -mx9 "${file}.tar.gz" "${file}.tar" >> "zip.log" 2>> "zip.log" | ||
rm -f "${file}.tar" | ||
|
||
# .zip | ||
rm -f "${file}.zip" | ||
7z a -mx9 "${file}.zip" "./${project}/*" >> "zip.log" 2>> "zip.log" | ||
done | ||
|
||
# Check zip | ||
archives=$(grep "Everything is Ok" zip.log -c) | ||
|
||
if [ "${archives}" -ne 9 ]; then | ||
echo "Error: Not all archives were created successfully." | ||
exit | ||
fi | ||
./do-zip "${id}" "${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,11 @@ label_prefix="md-darts" | |
labels=( | ||
"tables" | ||
) | ||
|
||
# Other files | ||
other_files=( | ||
"api" | ||
"cli" | ||
"core" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,7 @@ | ||
#!/bin/sh | ||
|
||
# Check version | ||
if [ $# -eq 0 ]; then | ||
echo "Error: No version supplied." | ||
exit | ||
fi | ||
|
||
version=${1} | ||
|
||
# Check branch | ||
branch=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
if [ "${branch}" != "main" ]; then | ||
echo "Error: Not on main branch." | ||
exit | ||
fi | ||
|
||
# Get properties | ||
. ./md-darts-tables-properties | ||
# Set project identifier | ||
id="md-darts-tables" | ||
|
||
# Tag | ||
for i in "${!names[@]}"; do | ||
message="${name_prefix} ${names[i]} ${version}" | ||
tag="${label_prefix}-${labels[i]}-${version}" | ||
git tag -am "${message}" "${tag}" | ||
done | ||
./do-tag "${id}" "${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,7 @@ | ||
#!/bin/sh | ||
|
||
# Check version | ||
if [ $# -eq 0 ]; then | ||
echo "Error: No version supplied." | ||
exit | ||
fi | ||
|
||
version=${1} | ||
|
||
# Check branch | ||
branch=$(git rev-parse --abbrev-ref HEAD) | ||
|
||
if [ "${branch}" != "main" ]; then | ||
echo "Warning: Not on main branch." | ||
fi | ||
|
||
# Get properties | ||
. ./md-darts-tables-properties | ||
|
||
# Clone repository | ||
cd .. | ||
git clone . "../darts-${version}" 2>/dev/null | ||
cd "../darts-${version}" || exit | ||
|
||
# Clean up | ||
rm -rf .git | ||
rm -rf api | ||
rm -rf cli | ||
rm -rf core | ||
rm -rf scripts | ||
find . -maxdepth 1 -name "*.md" -delete | ||
# Set project identifier | ||
id="md-darts-tables" | ||
|
||
# Zip | ||
echo -n "" > "zip.log" | ||
|
||
for i in "${!labels[@]}"; do | ||
label="${labels[i]}" | ||
project="${label_prefix}-${label}" | ||
path="${label}/${project}" | ||
file="${project}-${version}" | ||
|
||
mv "${path}" "${project}" 2>/dev/null | ||
rm -rf "${label}" | ||
rm -rf "${project}/.idea" | ||
|
||
# .tar.gz | ||
rm -f "${file}.tar.gz" | ||
7z a "${file}.tar" "./${project}/*" >> "zip.log" 2>> "zip.log" | ||
7z a -mx9 "${file}.tar.gz" "${file}.tar" >> "zip.log" 2>> "zip.log" | ||
rm -f "${file}.tar" | ||
|
||
# .zip | ||
rm -f "${file}.zip" | ||
7z a -mx9 "${file}.zip" "./${project}/*" >> "zip.log" 2>> "zip.log" | ||
done | ||
|
||
# Check zip | ||
archives=$(grep "Everything is Ok" zip.log -c) | ||
|
||
if [ "${archives}" -ne 3 ]; then | ||
echo "Error: Not all archives were created successfully." | ||
exit | ||
fi | ||
./do-zip "${id}" "${1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.