Update readme.md and add release script
This commit is contained in:
parent
ff98b743e5
commit
c297cb5450
2 changed files with 45 additions and 4 deletions
41
release.sh
Normal file
41
release.sh
Normal file
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Define the file
|
||||
TOC_FILE="CzechQuests.toc"
|
||||
|
||||
if [[ -f "$TOC_FILE" ]]; then
|
||||
# Read version number from the file
|
||||
VERSION=$(grep "## Version:" "$TOC_FILE" | cut -d ' ' -f 3)
|
||||
echo "Version: $VERSION"
|
||||
else
|
||||
echo "File $TOC_FILE does not exist."
|
||||
fi
|
||||
|
||||
# Define the name of the zipfile
|
||||
ZIPFILE="czech-quests-v$VERSION.zip"
|
||||
|
||||
# Define files/directories to zip
|
||||
FILES_TO_ZIP="*"
|
||||
|
||||
# Define files/directories to exclude
|
||||
# File names should be separated by space and wrapped in double quotes
|
||||
EXCLUDE_FILES=(
|
||||
".idea"
|
||||
".gitignore"
|
||||
".gitattributes"
|
||||
"screenshot.png"
|
||||
"README.md"
|
||||
"release.sh"
|
||||
ZIPFILE
|
||||
)
|
||||
|
||||
# Initialize exclusion string
|
||||
EXCLUDE=""
|
||||
|
||||
# Build exclusion string
|
||||
for FILE in "${EXCLUDE_FILES[@]}"; do
|
||||
EXCLUDE+=" --exclude=$FILE"
|
||||
done
|
||||
|
||||
# Create the zip file
|
||||
eval "zip -r $ZIPFILE $FILES_TO_ZIP$EXCLUDE"
|
Loading…
Add table
Add a link
Reference in a new issue