In this video, we complete the periodic maintenance of our gem that we started in the previous episode. We generate a new gem certificate, as we've done most recently in Episode 98. Back when we did that, the process was noted in the commit message so we can refer back to it in this video.
We replace the gem certificate by copying the old one to an archive directory and using the `gem cert --build` command and do a dry run from the feature branch. (The feature branch, checked out off of master has a version of 0.6.0, which is different than the 0.5.1 that we will eventually release.) We uninstall the dry run version of the gem after building it.
When it comes time to build the gem off of version-0-5-x-stable, Mike makes a mistake in cherry-picking the commit from the previous video off of the feature branch. The version defined in your gemspec needs to match that of the Gemfile.lock or the `bundle install` command. After reverting a couple of commits, we fix the Gemfile.lock and the build succeeds. We build the gem version we intend to release and successfully push it to RubyGems.
After that, we take care of some documentation by updating the CHANGELOG and security policy on the feature branch. Then it's time to generate the checksums for 0.5.1, but uh-oh. Mike deleted the .gem file. Thankfully we can download the file back down from RubyGems. We get our changes into GitHub, tag the commit that was built for version 0.5.1, take care of our pull request to merge the feature branch into master, and close the issue.
This video covers:
00:00:00 Introduction, review of previous video, and plan for the video.
00:01:33 Review commit message from last certificate replacement with instructions
00:02:27 Move the old gem certs into the old_gem_certs directory
00:03:13 Generate the new cert
00:04:15 Copy the gem-public_cert.pem to the gem certs/ directory, rename it and trust it
00:05:36 Do a dry run gem build to ensure the gem can install with HighSecurity. Uninstall the test version.
00:08:05 Commit and push the changed certificate to the feature branch
00:10:34 Bump the version on version-0-5-x-stable and cherry-pick the commits from the feature branch, reconciling conflicts (incorrectly)
00:14:39 Fix the build failure: Reset the branch to the commit before the cherry-picks. Issue was un-buildable Gemfile.lock. Force-push to branch.
00:18:40 Build version 0.5.1 of the gem and release it to RubyGems.
00:20:55 Install the released version of the gem from RubyGems with high security
00:21:37 Bump the working version of the version-0-5-x-stable branch to 0.5.2
00:23:45 Switch back to the feature branch and update the CHANGELOG
00:27:37 Update the security policy to indicate that the old versions of the gem are no longer supported
00:29:04 Commit the changes to the CHANGELOG and security policy
00:30:16 Generate checksums and publish last commit to the feature branch. (Re-download the pushed version of the gem from RubyGems because I deleted it)
00:34:21 Checkout the commit of the 0.5.1 release, tag it, and push the tag
00:36:37 Open pull request from feature branch into master
00:39:20 Create GitHub release for 0.5.1 off of the tag
00:40:44 Merge pull request into master, close the issue, and delete the feature branch
#ruby #rubygems #codecast #screencast #NerdDice #DnD #roleplaying #softwaredevelopment #github #opensource #dice #release #patchrelease #tlm
See other related StatelessCode videos:
Create a RubyGem 06: Release the Gem! • Codecast: Create a RubyGem 06: Releas...
Create a RubyGem 09: Fix RuboCop issues and release a patch version • Codecast: Create a RubyGem 09: Fix Ru...
Create a RubyGem 23: Release version 0.2.0 of the gem • Codecast: Create a RubyGem 23: Releas...
Create a RubyGem 61: Release 0.3.0! • Codecast: Create a RubyGem 61: Releas...
Create a RubyGem 85: Release Version 0.4.0! • Codecast: Create a RubyGem 85: Releas...
Create a RubyGem 98: Replace the Expired Gem Certificate • Create a RubyGem 98: Replace the Expi...
Create a RubyGem 99: Backport Changes to Other Stable Branches and Update the CHANGELOG • Create a RubyGem 99: Backport Changes...
Create a RubyGem 100: Release Patch Versions and New Minor Version (0.5.0) of the Gem • Create a RubyGem 100: Release Patch V...
Resources that we relied upon for this solution::
Commit from video 98 with commit message that has instructions https://github.com/statelesscode/nerd...
This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
Watch video Create a RubyGem 103: Winter 2024 Maintenance Part 2 - Update Certs and Release Version 0.5.1 online without registration, duration hours minute second in high quality. This video was added by user Stateless Code 16 April 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 13 once and liked it 0 people.