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

Add --commitish option to specify target_commitish branch #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Susheer
Copy link

@Susheer Susheer commented Nov 18, 2024

Problem

The target_commitish parameter is hardcoded to 'master', causing issues when the default branch is different.

Solution

  • Added a --commitish option to allow users to specify the branch for the target_commitish parameter.
  • If the --commitish option is not provided, it defaults to 'master'.

Changes Made

  • Updated the publish command to include the --commitish option.
  • Modified the logic to use the value provided by --commitish or default to 'master'.

Testing

  • Tested with repositories having different default branches.
  • Verified that the --commitish option correctly sets the target_commitish parameter.
  • Ensured that the tool defaults to 'master' if the --commitish option is not provided.

Usage

node-pre-gyp-github publish --release --commitish main
or 
node-pre-gyp-github publish  --commitish main

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.

1 participant