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

Commit

Permalink
Merge branch 'main' of github.com:deta/pc-cli into new-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
aavshr committed Sep 6, 2023
2 parents a2fd44e + 3441d6c commit f7ec84a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 13 deletions.
8 changes: 2 additions & 6 deletions cmd/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ Tip: Use the .spaceignore file to exclude certain files and directories from bei
skipLogs, _ := cmd.Flags().GetBool("skip-logs")
experimental, _ := cmd.Flags().GetBool("experimental")

err := push(projectID, projectDir, pushTag, openInBrowser, skipLogs, experimental)
if err != nil {
return err
}
return nil
return push(projectID, projectDir, pushTag, openInBrowser, skipLogs, experimental)
},
}

Expand Down Expand Up @@ -195,7 +191,7 @@ func push(projectID, projectDir, pushTag string, openInBrowser, skipLogs, experi
}
if b.Status != api.Complete {
utils.Logger.Println(styles.Errorf("\n%s Failed to push code and create a revision. Please try again!", emoji.ErrorExclamation))
return err
return fmt.Errorf("build isn't complete")
}

// get promotion via build id (build id == revision id)
Expand Down
2 changes: 1 addition & 1 deletion cmd/utils/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func ProjectNotes(projectName string, projectId string) string {
%s Use the %s to configure your app: %s
%s Push your code to Space with %s`, styles.Bold("Next steps:"), emoji.Eyes,
styles.Bold(fmt.Sprintf("%s/%s", BuilderUrl, projectId)),
emoji.Files,
emoji.File,
styles.Code("Spacefile"), styles.Bold(SpacefileDocsUrl),
emoji.Swirl,
styles.Code("space push"))
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/deta/space
go 1.19

require (
github.com/AlecAivazis/survey/v2 v2.3.6
github.com/adrg/frontmatter v0.2.0
github.com/alessio/shellescape v1.4.1
github.com/charmbracelet/bubbles v0.15.0
Expand All @@ -22,11 +23,10 @@ require (
)

require (
github.com/AlecAivazis/survey/v2 v2.3.6 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230417170513-8ee5748c52b5 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/cloudflare/circl v1.3.2 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-querystring v1.1.0 // indirect
Expand Down
9 changes: 6 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ github.com/AlecAivazis/survey/v2 v2.3.6/go.mod h1:4AuI9b7RjAR+G7v9+C4YSlX/YL3K3c
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s=
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
github.com/ProtonMail/go-crypto v0.0.0-20230417170513-8ee5748c52b5 h1:QXMwHM/lB4ZQhdEF7JUTNgYOJR/gWoFbgQ/2Aj1h3Dk=
github.com/ProtonMail/go-crypto v0.0.0-20230417170513-8ee5748c52b5/go.mod h1:8TI4H3IbrackdNgv+92dI+rhpCaLqM0IfpgCgenFvRE=
Expand All @@ -27,15 +28,16 @@ github.com/charmbracelet/lipgloss v0.6.0/go.mod h1:tHh2wr34xcHjC2HCXIlGSG1jaDF0S
github.com/charmbracelet/lipgloss v0.7.1 h1:17WMwi7N1b1rVWOjMT+rCh7sQkvDU75B2hbZpc5Kc1E=
github.com/charmbracelet/lipgloss v0.7.1/go.mod h1:yG0k3giv8Qj8edTCbbg6AlQ5e8KNWpFujkNawKNhE2c=
github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I=
github.com/cloudflare/circl v1.3.2 h1:VWp8dY3yH69fdM7lM6A1+NhhVoDu9vqK0jOgmkQHFWk=
github.com/cloudflare/circl v1.3.2/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSbuGLtRhnw=
github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs=
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw=
github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U=
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
Expand All @@ -50,6 +52,7 @@ github.com/google/go-github/v51 v51.0.0 h1:KCjsbgPV28VoRftdP+K2mQL16jniUsLAJknsO
github.com/google/go-github/v51 v51.0.0/go.mod h1:kZj/rn/c1lSUbr/PFWl2hhusPV7a5XNYKcwPrd5L3Us=
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog=
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
Expand Down
7 changes: 6 additions & 1 deletion internal/runtime/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,14 @@ func ZipDir(sourceDir string) ([]byte, int, error) {
if err != nil {
return err
}
if path == absDir {
return nil
}

// matching against the the `TrimPrefix`ed transformation so that you can have your
// project in a folder called `dist`, for example.
// skip if shouldSkip according to skipPaths which are derived from .spaceignore
shouldSkip := spaceignore.MatchesPath(path)
shouldSkip := spaceignore.MatchesPath(strings.TrimPrefix(path, absDir+"/"))
if shouldSkip && info.IsDir() {
return filepath.SkipDir
}
Expand Down
1 change: 1 addition & 0 deletions pkg/scanner/runtimes.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func staticScanner(dir string) (*shared.Micro, error) {
m := &shared.Micro{
Name: name,
Src: dir,
Serve: "./",
Engine: shared.Static,
}
return m, nil
Expand Down

0 comments on commit f7ec84a

Please sign in to comment.