diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 22443d8..26c870c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -37,3 +37,4 @@ jobs: - run: yarn lint - run: yarn compile - run: yarn test + - run: yarn check-compile-output diff --git a/package.json b/package.json index 82727e0..4a02059 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,6 @@ "engines": { "node": ">=10" }, - "dependencies": { - "solc": "0.5.16" - }, "devDependencies": { "@types/chai": "^4.2.6", "@types/mocha": "^5.2.7", @@ -14,13 +11,18 @@ "mocha": "^6.2.2", "prettier": "^1.19.1", "rimraf": "^3.0.0", + "solc": "0.5.16", "ts-node": "^8.5.4", "typescript": "^3.7.3" }, "scripts": { "lint": "yarn prettier ./test/*.ts --check", - "compile": "rimraf ./build/ && waffle .waffle.json", - "test": "mocha" + "clean": "rimraf ./build/", + "precompile": "yarn clean", + "compile": "waffle .waffle.json", + "pretest": "yarn compile", + "test": "mocha", + "check-compile-output": "./scripts/check-compile-output.sh" }, "license": "GPL-3.0-or-later" -} +} \ No newline at end of file diff --git a/scripts/check-compile-output.sh b/scripts/check-compile-output.sh new file mode 100755 index 0000000..fadf9ad --- /dev/null +++ b/scripts/check-compile-output.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Checks that there are no uncommitted files in the repo. +if [[ -z $(git status -s) ]] +then + exit 0 +else + echo "There are uncommitted file changes!" + echo "The committed build artifacts likely do not match the source code." + exit 1 +fi