Commit cd60a3a7 authored by Carlos Juliano Viana's avatar Carlos Juliano Viana
Browse files

Ajustando o release-prepare que estava falhando na comparação do branch...

Ajustando o release-prepare que estava falhando na comparação do branch corrente com o branch master.

[SOMA-3699]
parent 3cd789d9
Pipeline #32566 skipped
......@@ -19,8 +19,10 @@ SNAPSHOT=$2
checkIsMaster()
{
res=$(git rev-parse --abbrev-ref HEAD)
echo "RES: $res"
[ ! "$res" == "master" ] && { echo "[Error] Tag can only be generated from master!"; exit -1; }
if [[ "$res" != "master" ]]; then
echo "[Error] Tag can only be generated from master!"
exit -1
fi
}
changeVersion()
......@@ -55,10 +57,9 @@ renameRockSpecs()
stageRockSpecs()
{
# Acrescenta os removidos
git st | grep "deleted" | awk '{print "git add "$2}' | sh -
# Acrescenta os novos
git add *.rockspec
git st | grep "deleted" | awk '{print "git add "$2}' | sh -
# Acrescenta os novos
git add *.rockspec
}
......@@ -67,7 +68,6 @@ releaseVersion()
echo "[..] release version $RELEASE..."
changeRockSpecs $RELEASE
renameRockSpecs $RELEASE
stageRockSpecs
git commit -m "[sgarest-daemon release] prepare release $RELEASE" && \
git tag -a $RELEASE -m "Release version $RELEASE." && \
......@@ -80,14 +80,13 @@ nextSnapshotVersion()
echo "[..] prepare for next development $SNAPSHOT..."
changeRockSpecs $SNAPSHOT
renameRockSpecs $SNAPSHOT
stageRockSpecs
git commit -m "[sgarest-daemon release] prepare for next development $SNAPSHOT" && \
git push && \
echo "[ok]"
}
#checkIsMaster
checkIsMaster
releaseVersion
nextSnapshotVersion
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment