allow suffix
This commit is contained in:
parent
4e4ddb8795
commit
d444921786
16
gitdist
16
gitdist
|
@ -9,15 +9,19 @@ example='projectName=spameggs
|
|||
sshUserHost="foo@bar.org"
|
||||
sshPort=22
|
||||
releaseFolder=/srv/releases
|
||||
files="binary1 binary2 readme.md"'
|
||||
files="binary1 binary2 readme.md"
|
||||
suffix=amd64Win (optional)'
|
||||
|
||||
source .gitdist || { echo "you need a .gitdist file in your git repo"; exit 1; }
|
||||
source .gitdist || { echo "you need a .gitdist file in your git repo"; leave=true; }
|
||||
|
||||
if [ -z "$projectName" ] || [ -z "$sshUserHost" ] || [ -z "$sshPort" ] || [ -z "$releaseFolder" ] || [ -z "$files" ]; then
|
||||
echo '.gitdist does not provide all necessary variables'
|
||||
echo "example of a .gitdist file:"
|
||||
echo "not all necessary variables provided - example of a .gitdist file:"
|
||||
echo
|
||||
echo "$example"
|
||||
leave=true
|
||||
fi
|
||||
|
||||
if [ "$leave" = true ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -25,10 +29,10 @@ timestamp=`date +"%Y%m%d-%H%M"`
|
|||
currentBranch=`git rev-parse --abbrev-ref HEAD`
|
||||
|
||||
if [ "$currentBranch" = "master" ]; then
|
||||
zipfile="$projectName-$timestamp.zip"
|
||||
zipfile="$projectName-$timestamp$suffix.zip"
|
||||
setCurrent=true
|
||||
else
|
||||
zipfile="$projectName-$currentBranch-$timestamp.zip"
|
||||
zipfile="$projectName-$currentBranch-$timestamp$suffix.zip"
|
||||
fi
|
||||
echo "zipfile: $zipfile"
|
||||
zip "$zipfile" $files
|
||||
|
|
Loading…
Reference in New Issue
Block a user