Skip to content

Commit 40d9fc3

Browse files
committed
Allow empty release asset suffix
1 parent bbd5d60 commit 40d9fc3

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflow/scripts/release/prepare-platform-assets.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ param(
1111
[Parameter(Mandatory = $true)]
1212
[string]$ReleaseVersion,
1313
[Parameter(Mandatory = $true)]
14+
[AllowEmptyString()]
1415
[string]$ReleaseAssetSuffix,
1516
[Parameter(Mandatory = $true)]
1617
[string]$ReleaseChannel,

.github/workflow/scripts/release/prepare-platform-assets.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ sha256_file() {
2020
}
2121

2222
required RELEASE_ASSETS_DIR
23-
required RELEASE_ASSET_SUFFIX
2423
required RELEASE_CHANNEL
2524
required RELEASE_NAMESPACE
2625
required RELEASE_PUBLIC_ORIGIN
2726
required RELEASE_TARGET
2827
required RELEASE_VERSION
2928
required TOOLS_PACK_DIR
3029

30+
RELEASE_ASSET_SUFFIX="${RELEASE_ASSET_SUFFIX:-}"
31+
3132
mkdir -p "$RELEASE_ASSETS_DIR"
3233

3334
case "$RELEASE_TARGET" in

tools/pack/tests/release-workflows.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ function countOccurrences(content: string, needle: string): number {
1616

1717
describe("release workflows", () => {
1818
it("requires Vela CLI only for beta mac arm64 packaging", async () => {
19-
const [beta, betaSelfHosted, preview, stable, buildMac, buildWin, prepareWin, publishPlatform] = await Promise.all([
19+
const [beta, betaSelfHosted, preview, stable, buildMac, buildWin, prepareMac, prepareWin, publishPlatform] = await Promise.all([
2020
readFile(new URL("../../../.github/workflows/release-beta.yml", import.meta.url), "utf8"),
2121
readFile(new URL("../../../.github/workflows/release-beta-s.yml", import.meta.url), "utf8"),
2222
readFile(new URL("../../../.github/workflows/release-preview.yml", import.meta.url), "utf8"),
2323
readFile(new URL("../../../.github/workflows/release-stable.yml", import.meta.url), "utf8"),
2424
readFile(new URL("../../../.github/workflow/scripts/release/build-platform.sh", import.meta.url), "utf8"),
2525
readFile(new URL("../../../.github/workflow/scripts/release/build-platform.ps1", import.meta.url), "utf8"),
26+
readFile(new URL("../../../.github/workflow/scripts/release/prepare-platform-assets.sh", import.meta.url), "utf8"),
2627
readFile(new URL("../../../.github/workflow/scripts/release/prepare-platform-assets.ps1", import.meta.url), "utf8"),
2728
readFile(new URL("../../../.github/workflow/scripts/release/storage/publish-platform.ts", import.meta.url), "utf8"),
2829
]);
@@ -72,6 +73,9 @@ describe("release workflows", () => {
7273
expect(betaSelfHosted).toContain("summary-metadata.ts");
7374
expect(win).toContain("-IncludeZip $${{ inputs.win_x64_target == 'all' || inputs.win_x64_target == 'zip' }}");
7475
expect(selfHostedWin).toContain("-IncludeZip $${{ inputs.win_x64_target == 'all' || inputs.win_x64_target == 'zip' }}");
76+
expect(prepareMac).not.toContain("required RELEASE_ASSET_SUFFIX");
77+
expect(prepareMac).toContain('RELEASE_ASSET_SUFFIX="${RELEASE_ASSET_SUFFIX:-}"');
78+
expect(prepareWin).toContain("[AllowEmptyString()]");
7579
expect(prepareWin).toContain("$sourcePayload = [string]$build.payloadPath");
7680
expect(prepareWin).toContain("open-design-$ReleaseVersion$ReleaseAssetSuffix-win-x64-payload.7z");
7781
expect(publishPlatform).toContain("open-design-${releaseVersion}${assetSuffix}-win-x64-payload.7z");

0 commit comments

Comments
 (0)