BearND has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/405210 )
Change subject: Dev: Make sure we tag the correct commit in the src repo
......................................................................
Dev: Make sure we tag the correct commit in the src repo
Get the corresponding commit in the src submodule
Gets the corresponding commit from the src repo via the submodule
and use that for tagging.
This will avoid tagging a commit that has been merged since deployment.
Yes, unfortunately, sometimes I've done the tagging a bit later than I
should have.
Change-Id: If5879fae9ac874de6f13e89fbc7530de1963abe3
---
M scripts/tag-deploy.sh
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps
refs/changes/10/405210/1
diff --git a/scripts/tag-deploy.sh b/scripts/tag-deploy.sh
index 53f4464..8614587 100755
--- a/scripts/tag-deploy.sh
+++ b/scripts/tag-deploy.sh
@@ -28,11 +28,16 @@
fi
fi
+# Get the corresponding commit in the src submodule
+cd src
+src_commit_id="$( git log --format="%h" -n 1 )"
+cd ..
+
# Build the deployment tag
deploy_commit_date="$( git show -s --format=%ci | awk '{print $1;}' )"
deploy_commit_id="$( git rev-parse --short HEAD )"
tag="deploy/$deploy_commit_date/$deploy_commit_id"
-# Tag the latest code repo commit with it & push tags
+# Tag the correct commit in the src repo with & push tags
cd "$repo_dir"
-git tag -s "$tag" -m "deployed" && git push origin "$tag" && printf "Applied
new tag: $tag\n"
+git tag -s "$tag" -m "deployed" $src_commit_id && git push origin "$tag" &&
printf "Applied new tag: $tag\n"
--
To view, visit https://gerrit.wikimedia.org/r/405210
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If5879fae9ac874de6f13e89fbc7530de1963abe3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits