Skip to content

Commit

Permalink
chore: fix build version
Browse files Browse the repository at this point in the history
  • Loading branch information
agliga committed Mar 27, 2024
1 parent 9119c46 commit 0f0e1d5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
# Build job
build:
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -68,7 +69,6 @@ jobs:
uses: actions/deploy-pages@v2
release:
runs-on: ubuntu-latest
needs: build
if: "${{ github.repository_owner == 'ebay' && github.event_name == 'push' }}"
steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ defaults:
path: "" # an empty string here means all files in the project
values:
cdn_path: https://ir.ebaystatic.com/cr/v/c1/skin
version: 17.3.0-next.0
version: 17.3.0
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"copy:tokensToDocs": "ncp src/tokens docs/static",
"copy:tokensToDist": "ncp src/tokens dist/tokens",
"verify": "node scripts verify",
"version": "npm run build:storybook && npm run build && git add -A dist docs && changeset version && node scripts/jekyll-config",
"version": "npm run build:storybook && npm run build && git add -A dist docs && changeset version && scripts/jekyll-config && npm i --package-lock-only",
"release": "npm run build && changeset publish",
"transpile": "babel docs/src/js --out-dir docs/_babel",
"build:snapshots": "npm run copy:assetsToStorybook && storybook build -o ./.storybook-percy",
Expand Down
6 changes: 2 additions & 4 deletions scripts/jekyll-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
* Updates the Jekyll front matter defaults with the current skin package version from NPM.
*/
const fs = require("fs");
const version = require("../package.json").version;
const files = ["./docs/_config.yml"];

files.forEach((file) => {
const newContents = fs
.readFileSync(file, "utf8")
.replace(
/version\:.*\n/gi,
`version: ${process.env.npm_package_version}\n`
);
.replace(/version\:.*\n/gi, `version: ${version}\n`);

fs.writeFile(file, newContents, "utf8", (err) => {
if (err) {
Expand Down

0 comments on commit 0f0e1d5

Please sign in to comment.