-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
39 additions
and
2 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,36 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Create new release tag | ||
# | ||
|
||
# Run Colombia Covid 19 Pipeline | ||
#./run.sh | ||
echo "" | ||
# Check any error | ||
if [ $? -eq 0 ]; then | ||
# Check the last version tag | ||
LAST_VERSION=$(hub release | head -n 1) | ||
echo "Last release $LAST_VERSION" | ||
# Get the last patch | ||
N=$(hub release | head -n 1 | tail -c 2) | ||
N=$(($N + 1)) | ||
#echo "N: $N" | ||
# Create version tag | ||
VERSION="$(date +%m).$(date +%d).$N" | ||
VERSION=$(echo $VERSION | cut -c2-) | ||
# Create new release | ||
echo "Creating new release $VERSION ..." | ||
git tag -a $VERSION -m "$VERSION" master | ||
git push --tags | ||
# Finish without error | ||
echo "Finished !" | ||
echo "Release $VERSION was created." | ||
# Success | ||
exit 0 | ||
else | ||
# Finish with error | ||
echo "Finish with errors ! FAIL" | ||
# Fail | ||
exit -1 | ||
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