Added release build script. Closes #3
This commit is contained in:
parent
b5e27de90d
commit
9f5f0c5642
3 changed files with 24 additions and 0 deletions
24
release.sh
Executable file
24
release.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
RELEASE=release
|
||||
|
||||
if [ $# != 1 ];
|
||||
then
|
||||
echo "Usage: $(basename "$0") <version>"
|
||||
exit 2
|
||||
else
|
||||
if ! [ -d "$RELEASE" ]
|
||||
then
|
||||
mkdir "$RELEASE"
|
||||
fi
|
||||
PROJECT=$(basename "$(pwd)")
|
||||
DIR="${PROJECT}-${1}"
|
||||
mkdir "$DIR"
|
||||
cp ./*.py ./*.md ./*.txt "$DIR"
|
||||
dos2unix "$DIR"/*.*
|
||||
touch "$DIR" "$DIR"/*.*
|
||||
tar -czvf "${RELEASE}/${DIR}.tar.gz" "$DIR"
|
||||
zip --to-crlf -r "${RELEASE}/${DIR}.zip" "$DIR"
|
||||
touch "$RELEASE"/*.*
|
||||
rm -rf "${DIR}"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue