From 74bb5d924d9e0b68a048bcac9f4bcd1a864bcef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Thu, 22 Jul 2021 21:53:18 +0200 Subject: [PATCH] Update CI --- .github/workflows/CI.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a1aafb9..05222ce 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -24,19 +24,20 @@ jobs: run: npx mocha - name: Check if CookieMonsterDev.js is built correctly run: | - npx webpack -o ./tmp --env production + npx webpack -o ./tmp --env minimize if cmp <(head -n 2 dist/CookieMonsterDev.js) <(head -n 2 tmp/CookieMonsterDev.js); then - echo '### SUCCESS: CookieMonsterDev is correctly built! ###' + echo '### SUCCESS: CookieMonsterDev is built correctly! ###' else - echo '### WARNING: CookieMonsterDev.js does not seem to be correct. Make sure to run "npm run build" after saving all your changes! ###' + echo '### WARNING: CookieMonsterDev.js does not seem to be correct. Make sure to run "npm run build-dev" after saving all your changes! ###' exit 1 fi - name: Check if CookieMonster.js is built correctly if: github.ref == 'refs/heads/master' run: | - if cmp <(head -n 2 dist/CookieMonsterDev.js) <(head -n 2 dist/CookieMonster.js); then - echo '### SUCCESS: CookieMonster is correctly built! ###' + npx webpack -o ./tmp --env minimize --env finalfile + if cmp <(head -n 2 dist/CookieMonster.js) <(head -n 2 tmp/CookieMonster.js); then + echo '### SUCCESS: CookieMonster is built correctly! ###' else - echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to copy CookieMonsterDev.js into CookieMonster.js before merging to master! ###' + echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to run "npm run build-final" after saving all your changes! ###' exit 1 fi \ No newline at end of file