From 175b0649c1c8994442ac0b2843376fab88620ad5 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Thu, 11 Aug 2016 07:03:41 +0300 Subject: [PATCH 1/4] Fix ssh remote url, convert to https --- release.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release.sh b/release.sh index cd8ddfd..cec3a7e 100755 --- a/release.sh +++ b/release.sh @@ -25,9 +25,9 @@ RESET="\033[0m" LATEST_HASH=$(git log --pretty=format:'%h' -n 1) -# Guess our remote url from remote.origin.url (minus .git from the end), -# change to your github project url. used to create Full changelog link -PROJECT_URL=$(git config --get remote.origin.url | sed 's/\.git//') +# Guess our remote url from remote.origin.url. Used to create Changelog link. +# You can change this to your project url, but detection should cover 99%. +PROJECT_URL=$(git config --get remote.origin.url | sed 's/\.git//' | sed 's/\:/\//' | sed 's/git@/https\:\/\//') # current Git branch BRANCH_CURRENT=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') From 4ab476c6e0f2190b1d777e7b1db2b5dbf4f7e26f Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Thu, 11 Aug 2016 07:18:53 +0300 Subject: [PATCH 2/4] Take account diffs in bitbucket and github changelog urls --- release.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/release.sh b/release.sh index cec3a7e..2e51477 100755 --- a/release.sh +++ b/release.sh @@ -114,11 +114,25 @@ git checkout -b "$BRANCH_RELEASE" "$BRANCH_DEV" # Set our new version to our version file echo "$NEW_VERSION" > "$FILE_VERSION" +# Fix compare url based on BitBucket or Github, default to GitHub +if [[ "$PROJECT_URL" == *bitbucket.org* ]]; then + # https://bitbucket.org/vendor/project/branches/compare/_NEW_%0D_OLD_ + VER_COMP_STR='branches/compare' + VER_COMP_SEP='%0D' + VER_COMP_TAG="$NEW_VERSION$VER_COMP_SEP$BASE_STRING" +else + # https://github.com/vendor/project/compare/_OLD_..._NEW_ + VER_COMP_STR='compare' + VER_COMP_SEP='...' + VER_COMP_TAG="$BASE_STRING$VER_COMP_SEP$NEW_VERSION" +fi + # Create our changelog echo "## $NEW_VERSION ($NOW)" > tmpfile git --no-pager log --pretty=format:" - %s" --date=short --no-merges "$BASE_STRING"...HEAD >> tmpfile echo "" >> tmpfile -echo "[Full changelog]($PROJECT_URL/compare/$BASE_STRING...$NEW_VERSION)" >> tmpfile +echo "" >> tmpfile +echo "[Full changelog]($PROJECT_URL/$VER_COMP_STR/$VER_COMP_TAG)" >> tmpfile echo "" >> tmpfile echo "" >> tmpfile cat "$FILE_CHANGELOG" >> tmpfile From b0f63b22acf2e122503ed641910d07965b9f7ec5 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Thu, 11 Aug 2016 07:23:18 +0300 Subject: [PATCH 3/4] Reverse commit message list --- release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.sh b/release.sh index 2e51477..22c7c16 100755 --- a/release.sh +++ b/release.sh @@ -129,7 +129,7 @@ fi # Create our changelog echo "## $NEW_VERSION ($NOW)" > tmpfile -git --no-pager log --pretty=format:" - %s" --date=short --no-merges "$BASE_STRING"...HEAD >> tmpfile +git --no-pager log --pretty=format:" - %s" --date=short --no-merges "$BASE_STRING"...HEAD | sed -n '1!G;h;$p' >> tmpfile echo "" >> tmpfile echo "" >> tmpfile echo "[Full changelog]($PROJECT_URL/$VER_COMP_STR/$VER_COMP_TAG)" >> tmpfile From d891ca07b2fc7b76453c2028a2f231eb72f39214 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Thu, 11 Aug 2016 07:24:06 +0300 Subject: [PATCH 4/4] Incrementing version number to 0.1.3 --- CHANGELOG.md | 8 ++++++++ VERSION | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8f0afe..88ead93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.1.3 (2016-08-11) + - Fix ssh remote url, convert to https + - Take account diffs in bitbucket and github changelog urls + - Reverse commit message list + +[Full changelog](https///github.com/superhelio/tools/compare/0.1.2...0.1.3) + + ## 0.1.2 (2016-08-10) - Explicitly push tags - Better wording to push question diff --git a/VERSION b/VERSION index d917d3e..b1e80bb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.2 +0.1.3