Skip to content

Commit

Permalink
fix(build): computation of doc folder based on the version number (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
divdavem authored Aug 25, 2023
1 parent d4d2c19 commit 946dd24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
working-directory: gh-pages
run: |
if [ -n "$VERSION" ]; then
export DOC_PATH="v${VERSION%.*}"
export DOC_PATH="v$(node scripts/versionDocFolder.js "$VERSION")"
else
export DOC_PATH="${{ inputs.docPath }}"
fi
Expand Down
4 changes: 4 additions & 0 deletions scripts/versionDocFolder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const {parse} = require('semver');

const version = parse(process.argv[2]);
console.log(`${version.major}.${version.minor}`);

0 comments on commit 946dd24

Please sign in to comment.