Skip to content

Commit

Permalink
Release: synchronising local with remote and fetching the tags from r…
Browse files Browse the repository at this point in the history
…emote to local
  • Loading branch information
neomatrix369 committed Oct 25, 2020
1 parent 72a3384 commit b4e04c8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions release-to-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}" \
Expand All @@ -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 ""
echo ""
echo "Fetching the tags to local machine."
git fetch --all
echo "Finished fetching the tags to local machine."

0 comments on commit b4e04c8

Please sign in to comment.