Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

Commit

Permalink
pipeline: fix scripts/changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
nickatsegment committed Oct 23, 2019
1 parent 8d030c7 commit 0f026ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile.release
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ publish-github-linux: publish-github-linux-bin publish-github-deb publish-github
publish-packagecloud: publish-packagecloud-deb publish-packagecloud-rpm

github-release:
set -o pipefail; \
scripts/changelog | github-release release \
--security-token $$GH_LOGIN \
--user segmentio \
Expand Down
6 changes: 3 additions & 3 deletions scripts/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ commit_url_base='https://github.com/segmentio/aws-okta/commit'

# generates a changelog between the current commit and the previous tag
changelog() {
local repo_url prev current excludes current_sha current_tag
local repo_url prev current current_sha current_tag

# if HEAD is a tag already, prev will the be second (non-prerelease) line
if git describe --exact-match --tags > /dev/null 2>&1; then
prev="$(git -c versionsort.suffix=- tag -l --sort=-v:refname | awk 'NR > 1 {print}' | grep -v '-' | awk 'NR == 1 {print}')"
current_tag="$(git -c versionsort.suffix=- tag -l --sort=-v:refname | awk 'NR == 1 {print}')"
prev="$(git -c versionsort.suffix=- tag -l --sort=-v:refname | awk 'NR > 1 {print}' | grep -v '-' | awk 'NR == 1 {print}')"
else
prev="$(git -c versionsort.suffix=- tag -l --sort=-v:refname | grep -v '-' | awk 'NR == 1 {print}')"
fi
Expand All @@ -40,7 +40,7 @@ changelog() {
local meta=()
local misc=()
oldifs=$IFS
lines_s=$(git log --pretty=format:"* [\`%h\`](${commit_url_base}/%H) %s (%an)" "${prev}..${current}" -- . ${excludes})
lines_s=$(git log --pretty=format:"* [\`%h\`](${commit_url_base}/%H) %s (%an)" "${prev}..${current}" -- .)
local IFS=$'\n'
lines=($lines_s)
for line in "${lines[@]:-}"; do
Expand Down

0 comments on commit 0f026ba

Please sign in to comment.