mirror of
https://github.com/superhelio/tools.git
synced 2026-01-30 17:46:37 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24c4d5ae11 | ||
|
|
d096216b86 | ||
|
|
de6539cd66 | ||
|
|
741c03f48f | ||
|
|
ec1a2e4863 | ||
|
|
99a2f8b7da | ||
|
|
68884e32a0 | ||
|
|
7ec7677935 | ||
|
|
f88f86fc6e | ||
|
|
bf8762497b | ||
|
|
56e8ed92bb | ||
|
|
1917e19ea9 | ||
|
|
d891ca07b2 | ||
|
|
b0f63b22ac | ||
|
|
4ab476c6e0 | ||
|
|
175b0649c1 | ||
|
|
b6fc18b6a4 |
15
.editorconfig
Normal file
15
.editorconfig
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
; This file is for unifying the coding style for different editors and IDEs.
|
||||||
|
; More information at http://editorconfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
/vendor/
|
/vendor/
|
||||||
|
/.idea/
|
||||||
|
|||||||
23
CHANGELOG.md
23
CHANGELOG.md
@@ -1,3 +1,26 @@
|
|||||||
|
## 0.1.5 (2016-08-15)
|
||||||
|
- Add .editorconfig
|
||||||
|
- Ignore .idea folder
|
||||||
|
- Comment out unused variables (unused colors and BRANCH_CURRENT)
|
||||||
|
- Remove extra new line before Full changelog link
|
||||||
|
|
||||||
|
[Full changelog](https://github.com/superhelio/tools/compare/0.1.4...0.1.5)
|
||||||
|
|
||||||
|
|
||||||
|
## 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)
|
## 0.1.2 (2016-08-10)
|
||||||
- Explicitly push tags
|
- Explicitly push tags
|
||||||
- Better wording to push question
|
- Better wording to push question
|
||||||
|
|||||||
31
release.sh
31
release.sh
@@ -17,20 +17,20 @@ NOW="$(date +'%Y-%m-%d')"
|
|||||||
RED="\033[1;31m"
|
RED="\033[1;31m"
|
||||||
GREEN="\033[0;32m"
|
GREEN="\033[0;32m"
|
||||||
YELLOW="\033[1;33m"
|
YELLOW="\033[1;33m"
|
||||||
BLUE="\033[1;34m"
|
#BLUE="\033[1;34m"
|
||||||
PURPLE="\033[1;35m"
|
#PURPLE="\033[1;35m"
|
||||||
CYAN="\033[1;36m"
|
CYAN="\033[1;36m"
|
||||||
WHITE="\033[1;37m"
|
WHITE="\033[1;37m"
|
||||||
RESET="\033[0m"
|
#RESET="\033[0m"
|
||||||
|
|
||||||
LATEST_HASH=$(git log --pretty=format:'%h' -n 1)
|
LATEST_HASH=$(git log --pretty=format:'%h' -n 1)
|
||||||
|
|
||||||
# Guess our remote url from remote.origin.url (minus .git from the end),
|
# Guess our remote url from remote.origin.url. Used to create Changelog link.
|
||||||
# change to your github project url. used to create Full 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//')
|
PROJECT_URL=$(git config --get remote.origin.url | sed 's/\.git//' | sed 's/\:/\//' | sed 's/git@/https\:\/\//' | sed 's/\/\/\//\:\/\//')
|
||||||
|
|
||||||
# current Git branch
|
# current Git branch
|
||||||
BRANCH_CURRENT=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
|
#BRANCH_CURRENT=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
|
||||||
|
|
||||||
# establish branch and tag name variables
|
# establish branch and tag name variables
|
||||||
BRANCH_DEV=develop
|
BRANCH_DEV=develop
|
||||||
@@ -114,11 +114,24 @@ git checkout -b "$BRANCH_RELEASE" "$BRANCH_DEV"
|
|||||||
# Set our new version to our version file
|
# Set our new version to our version file
|
||||||
echo "$NEW_VERSION" > "$FILE_VERSION"
|
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
|
# Create our changelog
|
||||||
echo "## $NEW_VERSION ($NOW)" > tmpfile
|
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/compare/$BASE_STRING...$NEW_VERSION)" >> tmpfile
|
echo "[Full changelog]($PROJECT_URL/$VER_COMP_STR/$VER_COMP_TAG)" >> tmpfile
|
||||||
echo "" >> tmpfile
|
echo "" >> tmpfile
|
||||||
echo "" >> tmpfile
|
echo "" >> tmpfile
|
||||||
cat "$FILE_CHANGELOG" >> tmpfile
|
cat "$FILE_CHANGELOG" >> tmpfile
|
||||||
|
|||||||
Reference in New Issue
Block a user