diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3a4614660..82f5ba22d 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -29,3 +29,9 @@ jobs: - run: yarn build - run: yarn gen - run: yarn coverage + - name: Compare Tact version from CLI flag `--version` against package.json + if: runner.os != 'Windows' + run: | + if [ "$(./bin/tact --version)" != "$(jq -r '.version' < package.json)" ]; + then false + fi diff --git a/bin/tact b/bin/tact index 4a5d86193..5b1a47ac0 100755 --- a/bin/tact +++ b/bin/tact @@ -5,8 +5,15 @@ const arg = require('arg'); // Resolve arguments const args = arg({ '--config': String, - '--project': String + '--project': String, + '--version': Boolean }); + +if (args['--version']) { + console.log('1.1.5'); + return; +} + if (!args['--config']) { console.log('USAGE: tact --config [--project