27 Commits

Author SHA1 Message Date
Ismo Vuorinen
68884e32a0 Merge branch 'release-0.1.4' 2016-08-11 07:33:51 +03:00
Ismo Vuorinen
f88f86fc6e Incrementing version number to 0.1.4 2016-08-11 07:33:51 +03:00
Ismo Vuorinen
bf8762497b Fix changelog url generation 2016-08-11 07:33:09 +03:00
Ismo Vuorinen
56e8ed92bb Merge branch 'release-0.1.3' 2016-08-11 07:24:06 +03:00
Ismo Vuorinen
1917e19ea9 Merge branch 'release-0.1.3' into develop 2016-08-11 07:24:06 +03:00
Ismo Vuorinen
d891ca07b2 Incrementing version number to 0.1.3 2016-08-11 07:24:06 +03:00
Ismo Vuorinen
b0f63b22ac Reverse commit message list 2016-08-11 07:23:18 +03:00
Ismo Vuorinen
4ab476c6e0 Take account diffs in bitbucket and github changelog urls 2016-08-11 07:18:53 +03:00
Ismo Vuorinen
175b0649c1 Fix ssh remote url, convert to https 2016-08-11 07:03:41 +03:00
Ismo Vuorinen
a62b76f1bd Merge branch 'release-0.1.2' 2016-08-10 14:28:16 +03:00
Ismo Vuorinen
b6fc18b6a4 Merge branch 'release-0.1.2' into develop 2016-08-10 14:28:16 +03:00
Ismo Vuorinen
d9f2bc146b Incrementing version number to 0.1.2 2016-08-10 14:28:16 +03:00
Ismo Vuorinen
79a048ce20 Explicitly push tags 2016-08-10 14:27:44 +03:00
Ismo Vuorinen
a1120207ee Better wording to push question 2016-08-10 14:27:18 +03:00
Ismo Vuorinen
5193045add Fix changelog url 2016-08-10 14:26:27 +03:00
Ismo Vuorinen
ea7562a48d Merge branch 'release-0.1.1' 2016-08-10 13:45:42 +03:00
Ismo Vuorinen
488a739643 Merge branch 'release-0.1.1' into develop 2016-08-10 13:45:42 +03:00
Ismo Vuorinen
2f85fb63a3 Incrementing version number to 0.1.1 2016-08-10 13:45:42 +03:00
Ismo Vuorinen
58abebab4f Echo into the temp file, not to the screen 2016-08-10 13:44:42 +03:00
Ismo Vuorinen
000be4feaf Merge branch 'release-0.1.0' 2016-08-10 13:43:45 +03:00
Ismo Vuorinen
7b11e1d3ef Merge branch 'release-0.1.0' into develop 2016-08-10 13:43:45 +03:00
Ismo Vuorinen
bfec35ece4 Incrementing version number to 0.1.0 2016-08-10 13:43:45 +03:00
Ismo Vuorinen
c2ccbbf08f Remove paging from git log, works better for automation 2016-08-10 13:41:05 +03:00
Ismo Vuorinen
ec78cb8335 Change changelog formatting to simple message 2016-08-10 13:40:32 +03:00
Ismo Vuorinen
06677cea39 Add link to full changelog, detect project url from origin url 2016-08-10 13:38:57 +03:00
Ismo Vuorinen
a0b8fa91c8 Add composer.json, ignore vendor folder 2016-08-10 13:38:22 +03:00
Ismo Vuorinen
a50e43b811 Merge branch 'release-0.0.10' into develop 2016-08-04 19:13:59 +03:00
5 changed files with 76 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/vendor/

View File

@@ -1,3 +1,38 @@
## 0.1.4 (2016-08-11)
- Fix changelog url generation
[Full changelog](https://github.com/superhelio/tools/compare/0.1.3...0.1.4)
## 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
- Fix changelog url
[Full changelog](https://github.com/superhelio/tools/compare/0.1.1...0.1.2)
## 0.1.1 (2016-08-10)
- Echo into the temp file, not to the screen
[Full changelog](https://github.com/superhelio/tools/compare/0.1.0...0.1.1)
## 0.1.0 (2016-08-10)
- Remove paging from git log, works better for automation
- Change changelog formatting to simple message
- Add link to full changelog, detect project url from origin url
- Add composer.json, ignore vendor folder
## 0.0.10 (2016-08-04)
- db2367d 2016-08-04 | Create the README.md (HEAD -> release-0.0.10, develop) [Ismo Vuorinen]
- 0140b53 2016-08-04 | Implement [shellcheck](https://www.shellcheck.net/) recommendations [Ismo Vuorinen]

View File

@@ -1 +1 @@
0.0.10
0.1.4

16
composer.json Normal file
View File

@@ -0,0 +1,16 @@
{
"name": "superhelio/tools",
"description": "Collection of our tools",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Ismo Vuorinen",
"email": "ismo.vuorinen@superhelio.com"
}
],
"require": {},
"bin": [
"release.sh"
]
}

View File

@@ -25,6 +25,10 @@ RESET="\033[0m"
LATEST_HASH=$(git log --pretty=format:'%h' -n 1)
# 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\:\/\//' | sed 's/\/\/\//\:\/\//')
# current Git branch
BRANCH_CURRENT=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
@@ -110,9 +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 log --pretty=format:" - %h %ad | %s%d [%an]" --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
echo "" >> tmpfile
echo "" >> tmpfile
cat "$FILE_CHANGELOG" >> tmpfile
@@ -142,11 +162,12 @@ git merge --no-ff "$BRANCH_RELEASE"
# Remove release branch
git branch -d "$BRANCH_RELEASE"
echo -ne "${QUESTION_FLAG} ${CYAN}Push?"
echo -ne "${QUESTION_FLAG} ${CYAN}Push everything to origin?"
read -r PUSH
if [[ $PUSH =~ [yY](es)* ]] || [ "$PUSH" = "" ]; then
git push --all origin
git push --tags origin
fi
echo -e "${NOTICE_FLAG} Done!"