Skip to content

Commit 9e1b959

Browse files
Merge pull request #107 from HashLoad/fix-upgrade
fix upgrade command
2 parents a2a48ad + 1f50d64 commit 9e1b959

File tree

10 files changed

+362
-291
lines changed

10 files changed

+362
-291
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ boss.json
3636
*.lps
3737
_dist
3838
bin/
39+
.env

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"mode": "auto",
1212
"program": "${workspaceFolder}",
13-
"args": ["config", "cache", "rm"]
13+
"args": ["upgrade"],
1414
}
1515
]
1616
}

cmd/upgrade.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package cmd
22

33
import (
4-
"github.com/hashload/boss/core"
4+
"github.com/hashload/boss/internal/upgrade"
55
"github.com/spf13/cobra"
66
)
77

@@ -15,8 +15,8 @@ var upgradeCmd = &cobra.Command{
1515
1616
Upgrade boss with pre-release:
1717
boss upgrade --dev`,
18-
Run: func(cmd *cobra.Command, args []string) {
19-
core.DoBossUpgrade(preRelease)
18+
RunE: func(cmd *cobra.Command, args []string) error {
19+
return upgrade.BossUpgrade(preRelease)
2020
},
2121
}
2222

core/upgrade.go

Lines changed: 0 additions & 211 deletions
This file was deleted.

go.mod

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,42 @@ require (
77
github.com/denisbrodbeck/machineid v1.0.1
88
github.com/go-git/go-billy/v5 v5.3.1
99
github.com/go-git/go-git/v5 v5.4.2
10-
github.com/masterminds/semver v1.4.2
10+
github.com/google/go-github/v45 v45.1.0
11+
github.com/masterminds/semver v1.5.0
12+
github.com/minio/selfupdate v0.4.0
1113
github.com/mitchellh/go-homedir v1.1.0
12-
github.com/snakeice/gogress v1.0.0
14+
github.com/snakeice/gogress v1.0.1
1315
github.com/snakeice/penv v0.0.0-20190326182452-4eb344cfbb6b
14-
github.com/spf13/cobra v0.0.5
15-
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca
16-
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b
17-
golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79
18-
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1
19-
golang.org/x/text v0.3.3
16+
github.com/spf13/cobra v1.4.0
17+
github.com/xlab/treeprint v1.1.0
18+
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
19+
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c
20+
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467
21+
golang.org/x/text v0.3.7
2022
)
2123

2224
require (
2325
github.com/Masterminds/semver v1.4.2 // indirect
24-
github.com/Microsoft/go-winio v0.4.16 // indirect
25-
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
26+
github.com/Microsoft/go-winio v0.5.2 // indirect
27+
github.com/ProtonMail/go-crypto v0.0.0-20220517143526-88bb52951d5b // indirect
2628
github.com/acomagu/bufpipe v1.0.3 // indirect
27-
github.com/emirpasic/gods v1.12.0 // indirect
28-
github.com/fatih/color v1.9.0 // indirect
29+
github.com/emirpasic/gods v1.18.1 // indirect
30+
github.com/fatih/color v1.13.0 // indirect
2931
github.com/go-git/gcfg v1.5.0 // indirect
30-
github.com/imdario/mergo v0.3.12 // indirect
32+
github.com/google/go-querystring v1.1.0 // indirect
33+
github.com/imdario/mergo v0.3.13 // indirect
3134
github.com/inconshreveable/mousetrap v1.0.0 // indirect
3235
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
33-
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
34-
github.com/lxn/win v0.0.0-20190311093451-0040366d7450 // indirect
35-
github.com/mattn/go-colorable v0.1.4 // indirect
36-
github.com/mattn/go-isatty v0.0.11 // indirect
37-
github.com/mattn/go-runewidth v0.0.9 // indirect
38-
github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936 // indirect
39-
github.com/sergi/go-diff v1.1.0 // indirect
40-
github.com/spf13/pflag v1.0.3 // indirect
41-
github.com/xanzy/ssh-agent v0.3.0 // indirect
42-
golang.org/x/net v0.0.0-20210326060303-6b1517762897 // indirect
36+
github.com/kevinburke/ssh_config v1.2.0 // indirect
37+
github.com/lxn/win v0.0.0-20210218163916-a377121e959e // indirect
38+
github.com/mattn/go-colorable v0.1.12 // indirect
39+
github.com/mattn/go-isatty v0.0.14 // indirect
40+
github.com/mattn/go-runewidth v0.0.13 // indirect
41+
github.com/mitchellh/go-ps v1.0.0 // indirect
42+
github.com/rivo/uniseg v0.2.0 // indirect
43+
github.com/sergi/go-diff v1.2.0 // indirect
44+
github.com/spf13/pflag v1.0.5 // indirect
45+
github.com/xanzy/ssh-agent v0.3.1 // indirect
46+
golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect
4347
gopkg.in/warnings.v0 v0.1.2 // indirect
4448
)

0 commit comments

Comments
 (0)