mirror of
https://github.com/superhelio/tools.git
synced 2026-02-08 06:50:43 +00:00
Add link to full changelog, detect project url from origin url
This commit is contained in:
@@ -25,6 +25,10 @@ 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),
|
||||||
|
# change to your github project url. used to create Full changelog link
|
||||||
|
PROJECT_URL=$(git config --get remote.origin.url | sed 's/^\.git*//')
|
||||||
|
|
||||||
# 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,')
|
||||||
|
|
||||||
@@ -114,6 +118,8 @@ echo "$NEW_VERSION" > "$FILE_VERSION"
|
|||||||
echo "## $NEW_VERSION ($NOW)" > tmpfile
|
echo "## $NEW_VERSION ($NOW)" > tmpfile
|
||||||
git log --pretty=format:" - %h %ad | %s%d [%an]" --date=short --no-merges "$BASE_STRING"...HEAD >> tmpfile
|
git log --pretty=format:" - %h %ad | %s%d [%an]" --date=short --no-merges "$BASE_STRING"...HEAD >> tmpfile
|
||||||
echo "" >> tmpfile
|
echo "" >> tmpfile
|
||||||
|
echo "[Full changelog]($PROJECT_URL/compare/$BASE_STRING...$NEW_VERSION)"
|
||||||
|
echo "" >> tmpfile
|
||||||
echo "" >> tmpfile
|
echo "" >> tmpfile
|
||||||
cat "$FILE_CHANGELOG" >> tmpfile
|
cat "$FILE_CHANGELOG" >> tmpfile
|
||||||
mv tmpfile $FILE_CHANGELOG
|
mv tmpfile $FILE_CHANGELOG
|
||||||
|
|||||||
Reference in New Issue
Block a user