Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
caesay committed Oct 23, 2024
1 parent 514853b commit 170a585
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
id-token: write

jobs:
cli-reference:
vpkcli:
strategy:
matrix:
os: [macos-latest, windows-latest]
Expand All @@ -26,15 +26,19 @@ jobs:
with:
name: cli-${{ matrix.os }}
path: generator/refout/*
complete:
generate:
runs-on: ubuntu-latest
needs: [cli-reference]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate
working-directory: generator
run: dotnet run
- uses: caesay/wait-artifact-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_wait_seconds: 900
artifacts: cli-macos-latest,cli-windows-latest
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
Expand Down
5 changes: 4 additions & 1 deletion generator/JavaScriptReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ public static async Task UpdateJavaScriptReference(string jsReferenceOutput)
Directory.CreateDirectory(jsReferenceOutput);

var workDir = Path.Combine(AppContext.BaseDirectory, "ref_JS");
Directory.Delete(workDir, true);
if (Directory.Exists(workDir)) {
Directory.Delete(workDir, true);
}

Directory.CreateDirectory(workDir);

await Util.StartShellProcess("npm", ["pack", "velopack"], workDir);
Expand Down

0 comments on commit 170a585

Please sign in to comment.