From cd60a3a754e4d8bbf960289493972184eef62087 Mon Sep 17 00:00:00 2001 From: Carlos Viana Date: Wed, 8 Apr 2020 14:43:43 -0300 Subject: [PATCH 1/4] =?UTF-8?q?Ajustando=20o=20release-prepare=20que=20est?= =?UTF-8?q?ava=20falhando=20na=20compara=C3=A7=C3=A3o=20do=20branch=20corr?= =?UTF-8?q?ente=20com=20o=20branch=20master.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [SOMA-3699] --- release-prepare.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/release-prepare.sh b/release-prepare.sh index b0c1be7..705f420 100755 --- a/release-prepare.sh +++ b/release-prepare.sh @@ -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 -- GitLab From 8d8d77b096b3ca6733b3ecd06e39870574e1b15e Mon Sep 17 00:00:00 2001 From: Carlos Viana Date: Wed, 8 Apr 2020 14:57:16 -0300 Subject: [PATCH 2/4] =?UTF-8?q?Alterando=20a=20fun=C3=A7=C3=A3o=20de=20sta?= =?UTF-8?q?geRocks=20para=20usar=20o=20comando=20"git=20status"=20no=20lug?= =?UTF-8?q?ar=20do=20alias=20"git=20st"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [SOMA-3699] --- release-prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-prepare.sh b/release-prepare.sh index 705f420..02e7f1c 100755 --- a/release-prepare.sh +++ b/release-prepare.sh @@ -57,7 +57,7 @@ renameRockSpecs() stageRockSpecs() { # Acrescenta os removidos - git st | grep "deleted" | awk '{print "git add "$2}' | sh - + git status | grep "deleted" | awk '{print "git add "$2}' | sh - # Acrescenta os novos git add *.rockspec } -- GitLab From d7d3469ec4ba33b00563d6cfa4969d6196e3585e Mon Sep 17 00:00:00 2001 From: Carlos Viana Date: Wed, 8 Apr 2020 15:01:24 -0300 Subject: [PATCH 3/4] =?UTF-8?q?Ajustando=20identa=C3=A7=C3=A3o=20da=20fun?= =?UTF-8?q?=C3=A7=C3=A3o=20stageRockSpecs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [SOMA-3699] --- release-prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-prepare.sh b/release-prepare.sh index 02e7f1c..25fa02f 100755 --- a/release-prepare.sh +++ b/release-prepare.sh @@ -68,7 +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 && \ -- GitLab From 375741550b1b30fd41fb95109b9d9cea991e37a7 Mon Sep 17 00:00:00 2001 From: Carlos Juliano M Viana Date: Thu, 16 Apr 2020 11:36:20 -0300 Subject: [PATCH 4/4] =?UTF-8?q?Adicionando=20a=20revis=C3=83=C2=A3o=20do?= =?UTF-8?q?=20rockspec=20ao=20gerar=20uma=20nova=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [SOMA-4310] [SOMA-4300] --- release-prepare.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/release-prepare.sh b/release-prepare.sh index 25fa02f..0c22c70 100755 --- a/release-prepare.sh +++ b/release-prepare.sh @@ -15,6 +15,7 @@ fi RELEASE=$1 SNAPSHOT=$2 +ROCKSPEC_REVISION=1 checkIsMaster() { @@ -56,7 +57,7 @@ renameRockSpecs() stageRockSpecs() { - # Acrescenta os removidos + # Acrescenta os removidos git status | grep "deleted" | awk '{print "git add "$2}' | sh - # Acrescenta os novos git add *.rockspec @@ -66,13 +67,14 @@ stageRockSpecs() releaseVersion() { echo "[..] release version $RELEASE..." - changeRockSpecs $RELEASE - renameRockSpecs $RELEASE + newVersion="$RELEASE-$ROCKSPEC_REVISION" + changeRockSpecs $newVersion + renameRockSpecs $newVersion stageRockSpecs git commit -m "[sgarest-daemon release] prepare release $RELEASE" && \ git tag -a $RELEASE -m "Release version $RELEASE." && \ git push --follow-tags && \ - echo "[ok]" + echo "[ok]" } nextSnapshotVersion() @@ -87,9 +89,10 @@ nextSnapshotVersion() } checkIsMaster -releaseVersion -nextSnapshotVersion +releaseVersion +nextSnapshotVersion echo "Success". exit 0; + -- GitLab