Skip to content

Test CSS Build Output

Wesley B edited this page Jul 23, 2022 · 10 revisions

Steps

Overview

  1. Build Core and relevant project CSS on main (using its submodule commit).
  2. Build Core and relevant project CSS on relevant branch to test (using its submodule commit).
  3. Confirm that built files have expected difference (if any is expected).

Unabridged

  1. Checkout main:
    • git checkout main
  2. Update tacciste_custom:
    • git submodule update If nothing happens, that is okay—it just means it is already up to date.
  3. Build CSS: npm run build --project=name-of-project-to-test.
  4. Confirm there is no error output.
  5. Copy built CSS to temporary directory for comparison:*
    • cp -r taccsite_cms/static/site_cms/css/build taccsite_cms/static/site_cms/css/build.test
    • cp -r taccsite_custom/the-project/static/the-project/css/build taccsite_custom/the-project/static/the-project/css/build.test
  6. Add/stage the new build.test directories (so you can compare them when they change):
    1. git add taccsite_cms/static/site_cms/css/build.test
    2. cd taccsite_custom
    3. git add the-project/static/the-project/css/build.test
    4. cd ../
  7. Checkout the branch to test.
  8. Update tacciste_custom:
    • git submodule update§
  9. Build CSS: npm run build --project=name-of-project-to-test.
  10. Confirm there is no error output.
  11. Overwrite previously copied built CSS with copy of newly built CSS:*†
    • rsync -a --delete taccsite_cms/static/site_cms/css/build/ taccsite_cms/static/site_cms/css/build.test/
    • rsync -a --delete taccsite_custom/the-project/static/the-project/css/build/ taccsite_custom/the-project/static/the-project/css/build.test/
  12. Review diff of build.test/'s files in working directory to staging/index.
    • git diff
  13. 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.

§ If the diff of taccsite_custom shows -dirty, that is expected—you made changes inside intentionally by creating the build.test directory.