Commit 381a897e authored by Gabriel Manhaes de Souza's avatar Gabriel Manhaes de Souza
Browse files

Merge branch 'developer' into 'master'

[SOMA-3699] Ajustando comparação do branch corrente com o master e a função stageRockSpecs.

See merge request !45
parents 3cd789d9 5514eb82
Pipeline #32576 passed with stages
in 1 minute and 10 seconds
......@@ -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 status | grep "deleted" | awk '{print "git add "$2}' | sh -
# Acrescenta os novos
git add *.rockspec
}
......@@ -67,8 +68,7 @@ releaseVersion()
echo "[..] release version $RELEASE..."
changeRockSpecs $RELEASE
renameRockSpecs $RELEASE
stageRockSpecs
stageRockSpecs
git commit -m "[sgarest-daemon release] prepare release $RELEASE" && \
git tag -a $RELEASE -m "Release version $RELEASE." && \
git push --follow-tags && \
......@@ -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