Skip to content

Commit

Permalink
Changelog: Minor touchups to scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
desimaniac committed Sep 6, 2019
1 parent 1554937 commit 0d27ba4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion scripts/changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ readonly CHANGELOG="changelog.txt"
readonly DATE=$(date +"%Y-%m-%d")
readonly REPO="https://github.com/cloudbox/cloudbox"
readonly PREVIOUS_VERSION=$(git describe --abbrev=0 --tags)
readonly NEXT_VERSION=$(echo $PREVIOUS_VERSION | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{$NF=sprintf("%0*d", length($NF), ($NF+1)); print}')
readonly NEXT_VERSION=$(echo $PREVIOUS_VERSION \
| awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{$NF=sprintf("%0*d", length($NF), ($NF+1)); print}')

# Boolean vars
readonly TRUE=1
Expand Down
8 changes: 2 additions & 6 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
# Variables
################################

readonly CHANGELOG="changelog.txt"
readonly DATE=$(date +"%Y-%m-%d")
readonly REPO="cloudbox/cloudbox"
readonly TAG=$(git describe --abbrev=0 --tags \
| awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{$NF=sprintf("%0*d", length($NF), ($NF+1)); print}')
readonly CHANGELOG_SCRIPT="scripts/changelog.sh"

################################
# Main
Expand All @@ -19,7 +18,7 @@ set -e

NAME="${TAG}"

BODY=$(bash scripts/changelog.sh -s)
BODY=$(bash "$CHANGELOG_SCRIPT" -s)

payload=$(
jq --null-input \
Expand All @@ -38,9 +37,6 @@ response=$(
"https://api.github.com/repos/${REPO}/releases"
)

upload_url="$(echo "$response" | jq -r .upload_url | sed -e "s/{?name,label}//")"


# Modifications by desimaniac @ github.com
#
# Source:
Expand Down

0 comments on commit 0d27ba4

Please sign in to comment.