Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle the first release of a gem with RELEASE_TYPE 'first' #32

Merged
merged 1 commit into from
Feb 5, 2023

Conversation

jcouball
Copy link
Member

@jcouball jcouball commented Feb 5, 2023

Handle the use case where this is the first release/

For this use case, let's assume the following:

  • the default branch is main (this is the HEAD branch returned by git remote show origin)
  • the current version of the gem is 0.1.0 (as returned by bump current)

If a different first version number is desired, update the version number in the
source code making sure that bump current returns the desired version number.
Then commit the change to the default branch on the remote before running this
script.

If you want to add custom frontmatter to your changelog file, see
How the changelog is updated. Any change
should be committed and merged/pushed to the default branch on the remote before
running this script.

The following prerequisites are checked by this script:

  • The current directory must be in the top level of the git repository
  • The HEAD commit of the default branch (main) must be checked out
  • The HEAD commit of the default branch of the local repository must match the
    HEAD commit of the default branch of the remote repository
  • There are no uncommitted or unstaged changes
  • The bundle must be up to date (the script will attempt to update the bundle if needed)
  • The next-release tag (v0.1.0) must NOT already exist
  • The next-release branch (release-v0.1.0) must NOT already exist
  • The gh command must be installed and authenticated via gh auth

You should run:

create-github-release first

The create-github-release script will do the following:

  • Determine the next-release version (v0.1.0) using bump current
  • Update the project's changelog file CHANGELOG.md
  • Create a release branch release-v0.1.0
  • Commit the changes to the changelog and create a release tag (v0.1.0) pointing
    to that commit
  • Push the release branch to GitHub
  • Create a GitHub release and pull request for the release

@jcouball jcouball requested a review from a team as a code owner February 5, 2023 00:14
@jcouball jcouball force-pushed the handle_first_release branch 4 times, most recently from d94df19 to c5fe5ce Compare February 5, 2023 18:26
@codeclimate
Copy link

codeclimate bot commented Feb 5, 2023

Code Climate has analyzed commit ab3e592 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 100.0% (0.0% change).

View more on Code Climate.

@jcouball jcouball changed the title Handle the first release of a gem Handle the first release of a gem with RELEASE_TYPE 'first' Feb 5, 2023
@jcouball jcouball merged commit bfd40e6 into main Feb 5, 2023
@jcouball jcouball deleted the handle_first_release branch February 5, 2023 18:30
@jcouball jcouball mentioned this pull request Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant