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

Conversation

@s3krit
Copy link
Contributor

@s3krit s3krit commented Jul 28, 2020

This PR is an overhaul of the way we publish draft releases on pushing of a new tag.
The old method was a very cumbersome 274-line bash script in addition to some helper functions in lib.sh.

The new version:

  • Outputs releases in exactly the same format as the bash version
  • Uses a Github action as opposed to a gitlab-ci job
  • Does all of the heavy-lifting in a ruby gem I wrote (which you don't need to worry about in the context of this PR)
  • Uses a template for formatting the release notes, which makes it much easier to edit (and separates formatting from logic)
  • Accesses Github way less so ends up running faster for releases with lots of changes

Using a real language rather than bash makes it a lot more readable and maintainable, even if you don't know so much Ruby (compared to the weird bash I was having to use).

@s3krit s3krit added B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Jul 28, 2020
@gavofyork gavofyork added the A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). label Jul 29, 2020
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It says "Set up Ruby 2.7" just a few lines above

rustc_stable = ENV['RUSTC_STABLE']
rustc_nightly = ENV['RUSTC_NIGHTLY']

polkadot_runtime = File.open(polkadot_path + '/runtime/polkadot/src/lib.rs')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe

polkadot_runtime = File.open(filepath) do |f|
  f.find {|l| l =~ /spec_version/ }.match(/[0-9]/+).first
end

…to make sure you close the file after reading?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good shout on the file handling :) thanks.
Though for whatever reason, MatchData doesn't have first or last methods...

@s3krit s3krit requested review from dvdplm and kirushik July 29, 2020 17:38
@s3krit s3krit merged commit 07df1b5 into paritytech:master Jul 30, 2020
@s3krit s3krit deleted the mp-publish-draft-release-action branch July 31, 2020 11:42
@s3krit s3krit restored the mp-publish-draft-release-action branch July 31, 2020 11:42
ordian added a commit that referenced this pull request Jul 31, 2020
* master:
  Candidate Validation Subsystem (#1432)
  reduce slash defer durations (#1504)
  Implement the Runtime API subsystem (#1494)
  Companion for #6610 (Balances Weight Trait) (#1425)
  [CI] Publish draft release redux (#1493)
  Update README docs related to local build (#1479)
  Add a default trie-memory-tracker feature to the cli (#1502)
  Companion PR for `Add a `DefaultQueue` type alias to remove the need to use `sp_api::TransactionFor`` (#1499)
  Fix bitfield signing (#1466)
  Update Substrate, bump versions, clean up sort (#1496)
  Bump Substrate
@s3krit s3krit deleted the mp-publish-draft-release-action branch August 5, 2020 11:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants