Skip to content

Commit

Permalink
fix: Replace spaces in asset name with dots, fixes #345 (#374)
Browse files Browse the repository at this point in the history
* fix: Replace spaces in asset name with dots, fixes #345

* update changefile to be about the feature in general as it's not released yet
  • Loading branch information
FabianLars authored Feb 6, 2023
1 parent 5ae9606 commit 2846fa8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/feat-updater-json.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'action': patch
---

Automatically generate `latest.json` file for Tauri's updater using the GitHub release as a CDN.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/upload-version-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ export async function uploadVersionJSON({
}

const sigFile = artifacts.find((s) => s.path.endsWith('.sig'));
const assetNames = new Set(artifacts.map((p) => getAssetName(p.path)));
const assetNames = new Set(
artifacts.map((p) => getAssetName(p.path).trim().replace(' ', '.')) // GitHub replaces spaces in asset names with dots
);
let downloadUrl = assets.data
.filter((e) => assetNames.has(e.name))
.find(
Expand Down

0 comments on commit 2846fa8

Please sign in to comment.