From 3882e3e0fbffacbbf95a69cd5304b332c7810c30 Mon Sep 17 00:00:00 2001 From: Edward <9326037+edwardoliveira@users.noreply.github.com> Date: Thu, 1 Aug 2019 14:15:10 -0300 Subject: [PATCH] Conserta release.sh (#2905) --- release.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/release.sh b/release.sh index 5bfd27fef..b99dbf05c 100755 --- a/release.sh +++ b/release.sh @@ -13,13 +13,14 @@ SED_AWKWARD_PATTERN="[0-9]+\.[0-9]+\.[0-9]+(-RC[0-9]+){0,1}" LATEST_VERSION=$(git tag | egrep $VERSION_PATTERN | sort --version-sort | tail -1) MAJOR_VERSION=$(echo $LATEST_VERSION | cut -d"-" -f1) -IS_RC=$(echo $LATEST_VERSION | egrep '(-RC)') MAJOR_TAG_CREATED=$(git tag | egrep $MAJOR_VERSION"$") if [ -n "$MAJOR_TAG_CREATED" ]; then LATEST_VERSION=$MAJOR_VERSION fi +IS_RC=$(echo $LATEST_VERSION | egrep '(-RC)') + LAST_DIGIT=`echo $MAJOR_VERSION | cut -f 3 -d '.'` MAIN_REV=`echo $MAJOR_VERSION | cut -f 1,2 -d '.'` NEXT_NUMBER=$(($LAST_DIGIT + 1)) @@ -33,17 +34,13 @@ function change_files { echo "Atualizando de "$OLD_VERSION" para "$FINAL_VERSION - sed -E s/$OLD_VERSION/$FINAL_VERSION/g docker-compose.yml > tmp1 - mv tmp1 docker-compose.yml + sed -E -i "s|$OLD_VERSION|$FINAL_VERSION|g" docker-compose.yml - sed -E s/$OLD_VERSION/$FINAL_VERSION/g setup.py > tmp2 - mv tmp2 setup.py + sed -E -i "s|$OLD_VERSION|$FINAL_VERSION|g" setup.py - sed -E s/$OLD_VERSION/$FINAL_VERSION/g sapl/templates/base.html > tmp3 - mv tmp3 sapl/templates/base.html + sed -E -i "s|$OLD_VERSION|$FINAL_VERSION|g" sapl/templates/base.html - sed -E s/$OLD_VERSION/$FINAL_VERSION/g sapl/settings.py > tmp4 - mv tmp4 sapl/settings.py + sed -E -i "s|$OLD_VERSION|$FINAL_VERSION|g" sapl/settings.py } function set_major_version { @@ -72,9 +69,12 @@ function commit_and_push { git commit -m "Release: $FINAL_VERSION" git tag $FINAL_VERSION + echo "================================================================================" + echo " Versão criada e gerada localmente." echo "Para enviar pro github execute..." echo "git push origin 3.1.x" echo "git push origin "$FINAL_VERSION + echo "================================================================================" echo "done." }