From b0301b662fe6d41687011a3b528ff00d781450f8 Mon Sep 17 00:00:00 2001 From: Quinton Hoffman Date: Fri, 21 Jun 2024 16:12:23 -0500 Subject: [PATCH] chore: use tmp dir (#23) --- .github/workflows/release.yml | 2 ++ package.json | 6 +++--- scripts/prepare.sh | 14 ++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a0478f..b20d72a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,4 +26,6 @@ jobs: - name: Install deps run: pnpm install - name: Semantic release + env: + TMP_DIR: ${{ runner.temp }} run: pnpm semantic-release diff --git a/package.json b/package.json index 496d671..26a6373 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vandy-scheduler", - "repository": "github:quinton22/VandyScheduler", + "repository": "https://github.com/quinton22/VandyScheduler.git", "engines": { "node": ">=20.8.1" }, @@ -32,7 +32,7 @@ "@semantic-release/exec", { "prepareCmd": "./scripts/prepare.sh ${nextRelease.version}", - "publishCmd": "pnpm release --source ./VandyScheduler.zip --extension-id $EXTENSION_ID" + "publishCmd": "pnpm release --source $TMP_DIR/VandyScheduler.zip --extension-id $EXTENSION_ID" } ], [ @@ -40,7 +40,7 @@ { "assets": [ { - "path": "./VandyScheduler.zip", + "path": "$TMP_DIR/VandyScheduler.zip", "label": "VandyScheduler.zip" } ] diff --git a/scripts/prepare.sh b/scripts/prepare.sh index 27ddf08..412865e 100644 --- a/scripts/prepare.sh +++ b/scripts/prepare.sh @@ -1,5 +1,5 @@ -VS_TEMP=/tmp/VandyScheduler/ +VS_TMP=$TMP_DIR/VandyScheduler/ validateVersion() { @@ -35,15 +35,14 @@ getFiles() { copyFiles() { local files=( "$( getFiles )" ) - mkdir /tmp/VandyScheduler - cp -r ./{$(IFS=,; echo "${files[*]}"),manifest.json} $VS_TEMP + mkdir $VS_TMP + cp -r ./{$(IFS=,; echo "${files[*]}"),manifest.json} $VS_TMP } createZip() { - local cwd=$( pwd ) - cd $VS_TEMP - zip -rq "$cwd/VandyScheduler.zip" * - cd $cwd + cd $VS_TMP + zip -rq "$VS_TMP/VandyScheduler.zip" * + cd - } main() { @@ -53,7 +52,6 @@ main() { build copyFiles createZip - echo "$( pwd )/VandyScheduler.zip" } main $@ \ No newline at end of file