question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[GH Actions] Update semantic versioning for Expensify.cash

See original GitHub issue

Upwork posting: https://www.upwork.com/jobs/~011cb60c9e032b2c3b

If you haven’t already, check out our contributing guidelines for onboarding!


Problem

We use the following semver (semantic versioning) schema for Expensify.cash: MAJOR.MINOR.PATCH-BUILD. Right now, the bumpVersion action only ever increments the BUILD version, but we need to be able to increment other segments of the semver version, too.

Why is this important?

This is a requirement in order to deploy Expensify.cash mobile to production.

Solution

We need the following updates made to the existing bumpVersion action:

  1. It should take a SEMVER_LEVEL input which must be one of: [MAJOR, MINOR, PATCH, BUILD]
  2. Based on the SEMVER_LEVEL parameter, it must update the correct portion of the semver version. So if the current version were 1.0.1-444 and I execute the bumpVersion action w/ a SEMVER_LEVEL of BUILD, the new version should be 1.0.1-445.
  3. Whenever you update a higher SEMVER_LEVEL, the lower levels should be reset to 0. For example, if the the current version were 1.0.2-444 and I execute the bumpVersion action w/ a SEMVER_LEVEL of MINOR, then the new version should be 1.1.0.
  4. A BUILD level of 0 should not be included in the semantic version. So if the the current version were 1.0.1-444 and I execute the bumpVersion action w/ a SEMVER_LEVEL of PATCH, then the new version should be 1.0.2, not 1.0.2-0.
  5. We also need this action to output the new version string to the workflow that executes it.
  6. The maximum number for each SEMVER_LEVEL should be 999, and if the maximum is reached then it should automatically bump the next level up. For example, if the current version is 1.0.999 and I execute this action w/ a SEMVER_LEVEL of PATCH, then this action should update the version to 1.1.0, not 1.0.1000.
  7. The existing functionality, which retries the npm version command in the event of a race condition/version conflict must be maintained.
  8. Automated tests should be written to cover all the functionality of this action.

To be considered complete

  • Verify that all 8 of the above are satisfied
  • Document testing done for this action in a separate repo before we will merge a PR and QA it in Expensify.cash
  • Provide a set of automated tests
  • You must test that all build levels are updated as expected.
  • Verify that the action still properly handles the npm version race condition that can occur if two or more PRs are merged in quick succession. You can test this by:
    1. Manually create a git tag in your repo for the highest existing version +1
    2. Execute this action, and if it bumps the version to the level of the tag you created in the previous step +1, then it was a success.
  • Verify that the version generated by this action is successfully output to the workflow that executed it by echoing the version in the workflow.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
roryabrahamcommented, Apr 13, 2021
0reactions
parasharrajatcommented, Apr 13, 2021

This issue is already resolved and thus should be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[GH Actions] Update semantic versioning for Expensify.cash · Issue ...
This is a requirement in order to deploy Expensify.cash mobile to production. Solution. We need the following updates made to the existing bumpVersion...
Read more >
DevOps: Automating Semantic Versioning Using GitHub Actions
A way to make version numbers more evocative is by using semantic versioning. The format of a semantic version number is MAJOR.MINOR.PATCH.
Read more >
Tht - ALBA.Net
Empresario genival melo, 112 brabant nieuws veldhoven, Expensify apk free ... Xerafy xxs, Action movies 2015 youtube full movie, Ariadna gh 12+1 nuevo...
Read more >
Gitiles - Code Review - GerritHub
Avoid writing scripts or custom code to deploy and update your applications? automate in a language that approaches plain English, ...
Read more >
代码 Issues - Gitee
kakaka update readme a7939c9 4年前 ... [guide] Update license year ... It creates a version of the function that executes in the context...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found