From 3824d11c9725f08ff811427a28692e1b4eacb020 Mon Sep 17 00:00:00 2001 From: TopchetoEU <36534413+TopchetoEU@users.noreply.github.com> Date: Sat, 9 Sep 2023 18:42:10 +0300 Subject: [PATCH] debugging again --- .github/workflows/tagged-release.yml | 2 +- build.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml index 3ab534c..484fcf5 100644 --- a/.github/workflows/tagged-release.yml +++ b/.github/workflows/tagged-release.yml @@ -18,7 +18,7 @@ jobs: repository: 'java-jscript' - name: "Build" run: | - cd java-jscript; node ./build.js release ${{ github.ref }} + ls -R; cd java-jscript; node ./build.js release ${{ github.ref }} - uses: "marvinpinto/action-automatic-releases@latest" with: diff --git a/build.js b/build.js index fcadb10..754eea5 100644 --- a/build.js +++ b/build.js @@ -3,7 +3,10 @@ const fs = require('fs/promises'); const pt = require('path'); const conf = require('./meta'); const { argv } = require('process'); -conf.version = argv[3].substring(1); +conf.version ??= argv[3]; + +if (conf.version.startsWith('refs/tags/')) conf.version = conf.version.substring(10); +if (conf.version.startsWith('v')) conf.version = conf.version.substring(1); async function* find(src, dst, wildcard) { const stat = await fs.stat(src);