Skip to content

Commit

Permalink
Release script added
Browse files Browse the repository at this point in the history
  • Loading branch information
sebaxtian committed Apr 10, 2020
1 parent 3e837fd commit d571f0b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ You can get the datasets from [colombia_covid_19_pipe](https://www.kaggle.com/se

## Requirements

See [requirements.txt](./requirements.txt) file.
- **Python 3**:
- See [requirements.txt](./requirements.txt) file.

## Source Code

Expand Down
36 changes: 36 additions & 0 deletions release.sh
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
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd ./src
echo "Running Colombia Covid 19 Pipeline ..."
python3 colombia_covid_19_pipe.py
# Check any error
if [ $? -eq 0 ]; then
if [ $? -eq 0 ]; then
# Go back to main directory
cd ../
# Finish without error
Expand Down

0 comments on commit d571f0b

Please sign in to comment.