-
Notifications
You must be signed in to change notification settings - Fork 0
How to Test Build Output
Wesley B edited this page Jul 23, 2022
·
3 revisions
- Build CSS on
main
. - Build CSS on relevant branch to test.
- Confirm that built files have expected difference (if any is expected).
- Checkout
main
:git checkout main
- Install dependencies:
npm ci
. - Build CSS:
npm run build
. - Confirm there is no error output.
- Copy built CSS to temporary directory for comparison:*
cp -r dist dist.test
- Add/stage the new
build.test
directory (so you can compare them when it changes):git add dist.test
- Checkout the branch to test.
- Install dependencies:
npm ci
. - Build CSS:
npm run build
. - Confirm there is no error output.
- Overwrite previously copied built CSS with copy of newly built CSS:*†
rsync -a --delete dist/ dist.test/
- Review diff of
build.test/
's files in working directory to staging/index.git diff
- Ensure only expected differences‡ appear.
Footnotes
* This is done so you can later compare the changes between built files on two branches using git diff
(n.b. you copy the build
directory so it can be tracked with Git because the build
directory is ignored by Git).
† Use rsync
to avoid OSX cp
issues.
‡ Refer to the PR or issue which linked you to this guide.