Browse Source

Adiciona opção de não enviar ao github

pull/1932/head
Edward Ribeiro 7 years ago
parent
commit
5c03a9f74f
  1. 44
      release.sh

44
release.sh

@ -6,14 +6,40 @@ MAIN_REV=`echo $VERSION | cut -f 1,2 -d '.'`
NEXT_NUMBER=$(($LAST_DIGIT + 1)) NEXT_NUMBER=$(($LAST_DIGIT + 1))
NEXT_VERSION=$MAIN_REV'.'$NEXT_NUMBER NEXT_VERSION=$MAIN_REV'.'$NEXT_NUMBER
sed -e s/$VERSION/$NEXT_VERSION/g docker-compose.yml > tmp1
mv tmp1 docker-compose.yml
sed -e s/$VERSION/$NEXT_VERSION/g setup.py > tmp2 function bump_version {
mv tmp2 setup.py sed -e s/$VERSION/$NEXT_VERSION/g docker-compose.yml > tmp1
mv tmp1 docker-compose.yml
sed -e s/$VERSION/$NEXT_VERSION/g setup.py > tmp2
mv tmp2 setup.py
}
function commit_and_push {
echo "committing..."
git add docker-compose.yml setup.py
git commit -m "Release: $NEXT_VERSION"
git tag $NEXT_VERSION
echo "sending to github..."
git push origin $NEXT_VERSION
git push origin
echo "done."
}
case "$1" in
--dryrun)
echo "Dry run"
bump_version
echo "done."
echo "Run git checkout -- docker-compose.yml setup.py to undo the files"
exit 0
;;
--a)
echo "generating release"
bump_version
commit_and_push
esac
git add docker-compose.yml setup.py
git commit -m "Release: $NEXT_VERSION"
git tag $NEXT_VERSION
git push origin $NEXT_VERSION
git push origin

Loading…
Cancel
Save