Skip to content

Commit

Permalink
🐛(ci) fix npm development version
Browse files Browse the repository at this point in the history
setuptools_scm generates a development version which can not be
compatible with the semver syntax used by npm. For a development
version, the version and prerelease tag should be seperate with a dash,
setuptools_scm use a period as separation. We have to transform the
version with one compatible with NPM.
  • Loading branch information
lunika committed Aug 1, 2024
1 parent c01cccf commit 0329981
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,11 @@ jobs:
if [[ -z "${CIRCLE_TAG+x}" ]]; then
python -m pip install --upgrade setuptools_scm
NEXT_VERSION=$(python -m setuptools_scm)
# Match version like 1.2.3.dev123
if [[ $NEXT_VERSION =~ ([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)\.([[:alnum:]]+) ]]; then
# transform it in 1.2.3-dev123
NEXT_VERSION="${BASH_REMATCH[1]}-${BASH_REMATCH[2]}"
fi
cd src/frontend/
npm version $NEXT_VERSION
cd ~/fun
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Versioning](https://semver.org/spec/v2.0.0.html).

- Fix course enrollment count shouldn't include the hidden runs.
- Fix RDFa errors on Google Search Console
- fix npm development version generated by setuptools_scm

### Removed

Expand Down

0 comments on commit 0329981

Please sign in to comment.