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 scripts/update-version.sh for automated version updates #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SilverCoder
Copy link
Contributor

Summary of Changes

This pull request introduces an automated version update mechanism to enhance version management in the project. The key changes include:

  • Addition of scripts/update-version.sh to automate updating the version in package.json.
  • Enhancement of the GitHub workflow (release.yml) to incorporate the new script for version management.
  • Ensuring the updated version is correctly passed from the build job to the publish job.

Details of Changes

scripts/update-version.sh

A new executable script, scripts/update-version.sh, has been added to facilitate automated version updates. This script accepts the following arguments:

  • If no argument is provided, it defaults to updating the patch version.
  • If major, minor, or patch is provided, it updates the respective version accordingly.
  • Alternatively, it accepts version numbers in the format x, x.x, or x.x.x (e.g., 1, 1.1, 1.0.1).

GitHub Workflow Changes

The .github/workflows/release.yml workflow has been updated to leverage the new version update script. Notable changes include:

  • Integration of the update-version step to execute the script and obtain the updated version.
  • Modification of steps to ensure the correct version is utilized throughout the workflow.
  • For the first run of the workflow, it is recommended to set a fixed version, as the initial version is currently 0.0.0. This can be achieved by utilizing the workflow input (e.g. 0.0.29, or 0.1.0).

- Introduce scripts/update-version.sh to update package.json version
  using npm version
- Update GitHub workflow to utilize the new script for version management
- Ensure the updated version in package.json is passed from the build job
  to the publish job
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