Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Pass git ref explicitely
Browse files Browse the repository at this point in the history
  • Loading branch information
chevdor committed Mar 18, 2022
1 parent 99cd17d commit ef71ed8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
cd polkadot/scripts/changelog
./bin/changelog
./bin/changelog ${GITHUB_REF}
ls -al release-notes.md
ls -al context.json
Expand Down
11 changes: 8 additions & 3 deletions scripts/changelog/bin/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
# frozen_string_literal: true

# call for instance as:
# ./bin/changelog v0.9.13
# ./bin/changelog <to> [<from>] [<output_file>]
# for instance, for the release notes of v1.2.3:
# ./bin/changelog v1.2.3
# or
# ./bin/changelog v1.2.3 v1.2.2
#
# You may set the ENV NO_CACHE to force fetching from Github
# You should also ensure you set the ENV: GITHUB_TOKEN
Expand All @@ -21,8 +25,9 @@ repo = 'polkadot'
gh_polkadot = SubRef.new(format('%<owner>s/%<repo>s', { owner: owner, repo: repo }))
last_release_ref = gh_polkadot.get_last_ref()

polkadot_ref1 = ARGV[0] || last_release_ref
polkadot_ref2 = ARGV[1] || 'HEAD'
polkadot_ref2 = ARGV[0] || 'HEAD'
polkadot_ref1 = ARGV[1] || last_release_ref

output = ARGV[2] || 'release-notes.md'

ENV['REF1'] = polkadot_ref1
Expand Down

0 comments on commit ef71ed8

Please sign in to comment.