Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 2a4edfe

Browse files
committed
deprecate experimental flag and support runner version flag for push cmd
1 parent 2ecc20e commit 2a4edfe

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

cmd/push.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ being uploaded during push.
5454
pushTag, _ := cmd.Flags().GetString("tag")
5555
openInBrowser, _ := cmd.Flags().GetBool("open")
5656
skipLogs, _ := cmd.Flags().GetBool("skip-logs")
57-
experimental, _ := cmd.Flags().GetBool("experimental")
57+
runnerVersion, _ := cmd.Flags().GetString("runner-version")
5858

59-
return push(projectID, projectDir, pushTag, openInBrowser, skipLogs, experimental)
59+
return push(projectID, projectDir, pushTag, runnerVersion, openInBrowser, skipLogs)
6060
},
6161
}
6262

@@ -66,13 +66,13 @@ being uploaded during push.
6666
cmd.Flags().StringP("tag", "t", "", "tag to identify this push")
6767
cmd.Flags().Bool("open", false, "open builder instance/project in browser after push")
6868
cmd.Flags().BoolP("skip-logs", "", false, "skip following logs after push")
69-
cmd.Flags().BoolP("experimental", "", false, "use experimental builds")
70-
cmd.Flags().MarkHidden("experimental")
69+
cmd.Flags().StringP("runner-version", "", "", "runner version to use for this push")
70+
cmd.Flags().MarkHidden("runner-version")
7171

7272
return cmd
7373
}
7474

75-
func push(projectID, projectDir, pushTag string, openInBrowser, skipLogs, experimental bool) error {
75+
func push(projectID, projectDir, pushTag, runnerVersion string, openInBrowser, skipLogs bool) error {
7676
utils.Logger.Printf("Validating your Spacefile...")
7777

7878
s, err := spacefile.LoadSpacefile(projectDir)
@@ -88,7 +88,7 @@ func push(projectID, projectDir, pushTag string, openInBrowser, skipLogs, experi
8888
return fmt.Errorf("failed to zip your project, %w", err)
8989
}
9090

91-
build, err := utils.Client.CreateBuild(&api.CreateBuildRequest{AppID: projectID, Tag: pushTag, Experimental: experimental, AutoPWA: *s.AutoPWA})
91+
build, err := utils.Client.CreateBuild(&api.CreateBuildRequest{AppID: projectID, Tag: pushTag, RunnerVersion: runnerVersion, AutoPWA: *s.AutoPWA})
9292
if err != nil {
9393
return fmt.Errorf("failed to start a build, %w", err)
9494
}

internal/api/api.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,10 @@ func (c *DetaClient) GetRevisions(r *GetRevisionsRequest) (*GetRevisionsResponse
290290
}
291291

292292
type CreateBuildRequest struct {
293-
AppID string `json:"app_id"`
294-
Tag string `json:"tag"`
295-
Experimental bool `json:"experimental"`
296-
AutoPWA bool `json:"auto_pwa"`
293+
AppID string `json:"app_id"`
294+
Tag string `json:"tag"`
295+
RunnerVersion string `json:"runner_version"`
296+
AutoPWA bool `json:"auto_pwa"`
297297
}
298298

299299
type CreateBuildResponse struct {

0 commit comments

Comments
 (0)