From c01bc7704dbac72b614446b3f40ee8232684ecdc Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 19 Apr 2024 16:21:05 -0400 Subject: [PATCH 1/2] Add version into deno bids-validator.js + create shim to run it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way anyone interested to use it could just git clone --depth 1 -b deno-build http://github.com/bids-standard/bids-validator export PATH="$PWD/bids-validator:$PATH" and start using it and know which version it is: ❯ bids-validator -V v1.14.6-dev.0-9-gdc61d0f3.deno An alternative for shim would be just to create it in that branch and then remove in CI only the .js files. I would be happy to redo if feels more sensible. --- .github/workflows/deno_tests.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deno_tests.yml b/.github/workflows/deno_tests.yml index da20032c3..60aa625b5 100644 --- a/.github/workflows/deno_tests.yml +++ b/.github/workflows/deno_tests.yml @@ -79,11 +79,14 @@ jobs: with: name: main path: main - - name: Commit to new branch + - name: Create shim, adjust version, and commit to new branch run: | mv main/main.js . mv main/bids-validator.js . - git add main.js bids-validator.js + sed -i -e "s,version(\"alpha\"),version(\"${VERSION}.deno\"),g" bids-validator.js + echo -e '#!/usr/bin/env bash\n\ndeno run --allow-read --allow-write --allow-env --allow-net --allow-run "$(dirname "$0")"/bids-validator.js "$@"' >| bids-validator + chmod a+x bids-validator + git add main.js bids-validator.js bids-validator git commit -m "BLD: $VERSION [skip ci]" || true - name: Push run: git push origin deno-build From 00418fe3e2736c78cfb4ab622b6581069a807c3b Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 10 Jun 2024 16:06:02 -0400 Subject: [PATCH 2/2] No version tune up would be needed now Co-authored-by: Chris Markiewicz --- .github/workflows/deno_tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deno_tests.yml b/.github/workflows/deno_tests.yml index 03ee38d9d..c8575c2ce 100644 --- a/.github/workflows/deno_tests.yml +++ b/.github/workflows/deno_tests.yml @@ -77,11 +77,10 @@ jobs: with: name: main path: main - - name: Create shim, adjust version, and commit to new branch + - name: Create shim and commit to new branch run: | mv main/main.js . mv main/bids-validator.js . - sed -i -e "s,version(\"alpha\"),version(\"${VERSION}.deno\"),g" bids-validator.js echo -e '#!/usr/bin/env bash\n\ndeno run --allow-read --allow-write --allow-env --allow-net --allow-run "$(dirname "$0")"/bids-validator.js "$@"' >| bids-validator chmod a+x bids-validator git add main.js bids-validator.js bids-validator