Skip to content

Commit ddd039a

Browse files
author
Shaun Persad
authored
Uploads from releases should have the "latest" flag (#741)
1 parent 717a67a commit ddd039a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cli/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ program
5050
branch: options.branch,
5151
},
5252
version: options.branch,
53+
latest: true,
5354
api: {
5455
endpoint: `https://${subdomain}.cfdata.org/api/v1/templates`,
5556
clientId,

cli/src/upload.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export type UploadConfig = {
1111
templateDirectory: string;
1212
seedRepo: SeedRepo;
1313
version: string;
14+
latest?: boolean;
1415
api: {
1516
endpoint: string;
1617
clientId: string;
@@ -43,6 +44,9 @@ export async function upload(config: UploadConfig) {
4344
async function uploadTemplates(body: FormData, config: UploadConfig) {
4445
const queryParams = new URLSearchParams(config.seedRepo);
4546
queryParams.set("version", config.version);
47+
if (config.latest) {
48+
queryParams.set("latest", `${true}`);
49+
}
4650
const response = await fetchWithRetries(
4751
`${config.api.endpoint}?${queryParams}`,
4852
{

0 commit comments

Comments
 (0)