From b4e04c83a6664fbb3cd351e6e32739554398e5ed Mon Sep 17 00:00:00 2001 From: Mani Sarkar Date: Sun, 25 Oct 2020 17:04:48 +0000 Subject: [PATCH] Release: synchronising local with remote and fetching the tags from remote to local --- release-to-github.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/release-to-github.sh b/release-to-github.sh index 46406dc..e6c2cfe 100755 --- a/release-to-github.sh +++ b/release-to-github.sh @@ -37,15 +37,19 @@ if [[ -z "${GITHUB_TOKEN:-}" ]]; then exit -1 fi +echo "Synchronising local repo with master" +git pull --rebase origin master +git push origin master + TAG_NAME="v${PACKAGE_VERSION}" POST_DATA=$(printf '{ "tag_name": "%s", "target_commitish": "master", "name": "%s", - "body": "Release %s: changelog available at https://github.com/neomatrix369/nlp_profiler/blob/master/CHANGELOG.md#${PACKAGE_VERSION}", + "body": "Release %s: changelog available at https://github.com/neomatrix369/nlp_profiler/blob/master/CHANGELOG.md#%s", "draft": false, "prerelease": false -}' ${TAG_NAME} ${TAG_NAME} ${TAG_NAME}) +}' ${TAG_NAME} ${TAG_NAME} ${TAG_NAME} ${PACKAGE_VERSION}) echo "Creating release ${PACKAGE_VERSION}: $POST_DATA" curl \ -H "Authorization: token ${GITHUB_TOKEN}" \ @@ -70,4 +74,7 @@ echo "PACKAGE_VERSION: ${PACKAGE_VERSION}. TAG_NAME: ${TAG_NAME}." echo "See change logs at https://github.com/neomatrix369/nlp_profiler/blob/master/CHANGELOG.md#${PACKAGE_VERSION}" echo "~~~ Finished creating tag and release on GitHub ~~~" echo "" -echo "" \ No newline at end of file +echo "" +echo "Fetching the tags to local machine." +git fetch --all +echo "Finished fetching the tags to local machine."