Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ linters:
- (io.Closer).Close
- (*os.File).Close
- os.Remove
maintidx:
# A high index indicates better maintainability (it's kind of the opposite of complexity).
under: 15 # Default: 20
exclusions:
rules:
# QF1008 "could remove embedded field from selector" is cosmetic.
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.1.2] - 2026-09-04

### Added
- `--no-wait` flag to `service push` and `service deploy` commands, which will cause the command to end once a process on Zerops is created, instead of waiting for it to fully complete

## [v1.1.1] - 2026-09-04

### Changed
- removed any use of deprecated elastic search endpoints and replaced with standard REST API

## [v1.1.0] - 2026-05-26

### Added
Expand Down
20 changes: 12 additions & 8 deletions src/cmd/serviceDeploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func serviceDeployCmd() *cmdBuilder.Cmd {
StringSliceFlag("path-to-file-or-dir", []string{"."}, "path to file or directory to be deployed. Can be repeated.").
BoolFlag("verbose", false, i18n.T(i18n.VerboseFlag), cmdBuilder.ShortHand("v")).
BoolFlag("deploy-git-folder", false, i18n.T(i18n.UploadGitFolder), cmdBuilder.ShortHand("g")).
BoolFlag("no-wait", false, "Do not wait for the Zerops deploy process to finish.").
HelpFlag(i18n.T(i18n.CmdHelpServiceDeploy)).
LoggedUserRunFunc(func(ctx context.Context, cmdData *cmdBuilder.LoggedUserCmdData) error {
uxBlocks := cmdData.UxBlocks
Expand Down Expand Up @@ -154,12 +155,10 @@ func serviceDeployCmd() *cmdBuilder.Cmd {
}

wg := sync.WaitGroup{}
wg.Add(1)
go func() {
defer wg.Done()
wg.Go(func() {
err := arch.TarFiles(writer, files)
writer.CloseWithError(err)
}()
})

if err := packageStream(ctx, appVersion.UploadUrl, finalReader); err != nil {
// if an error occurred while packing the app, return that error
Expand Down Expand Up @@ -207,7 +206,14 @@ func serviceDeployCmd() *cmdBuilder.Cmd {
return err
}

err = uxHelpers.ProcessCheckWithSpinner(
if cmdData.Params.GetBool("no-wait") {
if deployProcess.Status.IsPending() || deployProcess.Status.IsRunning() {
cmdData.UxBlocks.PrintSuccessText(i18n.T(i18n.DeployRunning))
}
return nil
}

if err := uxHelpers.ProcessCheckWithSpinner(
ctx,
cmdData.UxBlocks,
[]uxHelpers.Process{{
Expand All @@ -216,9 +222,7 @@ func serviceDeployCmd() *cmdBuilder.Cmd {
ErrorMessageMessage: i18n.T(i18n.DeployFailed),
SuccessMessage: i18n.T(i18n.DeployFinished),
}},
)

if err != nil {
); err != nil {
return err
}

Expand Down
8 changes: 8 additions & 0 deletions src/cmd/servicePush.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func servicePushCmd() *cmdBuilder.Cmd {
StringFlag("workspace-state", archiveClient.WorkspaceAll, i18n.T(i18n.PushWorkspaceState), cmdBuilder.ShortHand("w")).
BoolFlag("no-git", false, i18n.T(i18n.NoGit)).
BoolFlag("disable-logs", false, "disable logs").
BoolFlag("no-wait", false, "Do not wait for the Zerops deploy process to finish.").
HelpFlag(i18n.T(i18n.CmdHelpPush)).
LoggedUserRunFunc(func(ctx context.Context, cmdData *cmdBuilder.LoggedUserCmdData) error {
uxBlocks := cmdData.UxBlocks
Expand Down Expand Up @@ -213,6 +214,13 @@ func servicePushCmd() *cmdBuilder.Cmd {
return err
}

if cmdData.Params.GetBool("no-wait") {
if deployProcess.Status.IsPending() || deployProcess.Status.IsRunning() {
cmdData.UxBlocks.PrintSuccessText(i18n.T(i18n.PushRunning))
}
return nil
}

guiHost := cmdData.CliStorage.Data().RegionData.GuiAddress.OrDefault("app.zerops.io")

var buildPhase bool
Expand Down