Skip to content

Commit

Permalink
Merge pull request #1326 from dxc-technology/marcialfps-publish-relea…
Browse files Browse the repository at this point in the history
…se-fix

Fix website build in release-website script
  • Loading branch information
marcialfps authored Oct 6, 2022
2 parents 8f4e799 + bf223f7 commit 2fcfe25
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ jobs:
- name: Test library
run: cd lib && npm run test

- name: Build website
run: cd website && yarn build

- name: Publish RELEASE to npm
run: |
sed -i "s#\"version\": \"0.0.0\"#\"version\": \"${TAG_NAME}\"#" ./dist/package.json
Expand Down
21 changes: 12 additions & 9 deletions scripts/release-website.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,19 @@ const getVersionsInS3Bucket = async () => {

const buildSite = (version) => {
return new Promise((resolve, reject) => {
console.log(`Building site with version ${version}/`);
exec(`SITE_VERSION=${version} yarn build`, (error, stdout, stderr) => {
if (error) {
throw new Error(error.message);
}
if (stderr) {
throw new Error(stderr);
console.log(`Building site with version ${version}`);
exec(
`cd website && SITE_VERSION=${version} yarn build`,
(error, stdout, stderr) => {
if (error) {
throw new Error(error.message);
}
if (stderr) {
throw new Error(stderr);
}
resolve(stdout);
}
resolve(stdout);
});
);
});
};

Expand Down

0 comments on commit 2fcfe25

Please sign in to comment.