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
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,13 @@ task docker:up
### Release candidates and nightlies

Tag release candidates on `main` with the next version and a dotted counter:
`v0.16.0-rc.1`, `v0.16.0-rc.2`. The dot matters from the tenth candidate on.
Semver compares `rc.10` and `rc.9` numerically but `rc10` and `rc9` lexically.
Without the dot, `v0.16.0-rc10` sorts below `v0.16.0-rc9` and the rc channel
never offers it. `arc self update` asks for confirmation before installing.
Pass `-y` or `--yes` to skip the prompt in scripts.
`v0.16.0-rc.1`, `v0.16.0-rc.2`. Arc also compares legacy counters numerically:
`rc9` sorts below `rc10`, and `rc10` compares equal to `rc.10`. The original
release tag is preserved for downloads. Older Arc binaries may need a one-time
`arc self update --force` when switching from undotted to dotted RC tags.

`arc self update` asks for confirmation before installing. Pass `-y` or `--yes`
to skip the prompt in scripts.

Nightlies are tagged automatically as `v<next patch>-nightly.<date>`. The next
patch, not the released version, is what makes a nightly sort above the current
Expand Down
17 changes: 17 additions & 0 deletions cmd/arc/self_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,23 @@ func TestSelfUpdaterWiring(t *testing.T) {
assert.NotNil(t, u.PreInstall)
}

func TestSelfUpdaterRecognizesLegacyRCUpdates(t *testing.T) {
for _, latest := range []string{"v0.16.0-rc10", "v0.16.0-rc.10"} {
t.Run(latest, func(t *testing.T) {
u := newSelfUpdater()
u.Version = "v0.16.0-rc9"
u.Source = fakeSource{tag: latest}
u.Store = &selfupdate.MemStore{Current: selfupdate.ChannelRC}

result, err := u.Check(t.Context())
require.NoError(t, err)
assert.Positive(t, result.Cmp, "the next RC must be offered without --force")
assert.Equal(t, "v0.16.0-rc9", result.Current)
assert.Equal(t, latest, result.Latest)
})
}
}

// channelCmdName is the "channel" subcommand's name.
const channelCmdName = "channel"

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/labstack/echo/v4 v4.15.0
github.com/oapi-codegen/runtime v1.1.2
github.com/pressly/goose/v3 v3.26.0
github.com/sentiolabs/go-selfupdate v0.1.1
github.com/sentiolabs/go-selfupdate v0.1.2
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.9
github.com/stretchr/testify v1.11.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qq
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sentiolabs/go-selfupdate v0.1.1 h1:76DV5ZJyldwHtDUWD1AMH145QTNOMB7OXzrfq+RIm3E=
github.com/sentiolabs/go-selfupdate v0.1.1/go.mod h1:EWIEmMHrf3qT8mxGo4GkZSlSNvbCrAdPWDthNrgvCiA=
github.com/sentiolabs/go-selfupdate v0.1.2 h1:YU11mxu2YvB8GSQy0Zag+AgpRWkkXn5bovYOFFscbt8=
github.com/sentiolabs/go-selfupdate v0.1.2/go.mod h1:EWIEmMHrf3qT8mxGo4GkZSlSNvbCrAdPWDthNrgvCiA=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah2SE=
Expand Down