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
2 changes: 1 addition & 1 deletion opencloud/docker/Dockerfile.multiarch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG TARGETOS
ARG TARGETARCH
ARG VERSION
ARG STRING
ARG EDITION
ARG EDITION="dev"

RUN apk add bash make git curl gcc musl-dev libc-dev binutils-gold inotify-tools vips-dev

Expand Down
7 changes: 5 additions & 2 deletions pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ func initEdition() error {
_, err := semver.NewVersion(editionParts[1])
return err == nil
}) {
Edition = Dev
return fmt.Errorf(`unknown edition channel "%s"`, Edition)
defer func() {
Edition = Dev
}()

return fmt.Errorf(`unknown edition channel '%s'`, Edition)
}

return nil
Expand Down
3 changes: 3 additions & 0 deletions pkg/version/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package version_test

import (
"fmt"
"strings"
"testing"

"github.com/opencloud-eu/opencloud/pkg/version"
Expand Down Expand Up @@ -59,6 +60,8 @@ func TestChannel(t *testing.T) {
fallthrough
case test.valid != (err == nil):
t.Fatalf("invalid edition: %s", version.Edition)
case !test.valid && !strings.Contains(err.Error(), "'"+test.got+"'"):
t.Fatalf("no mention of invalid edition '%s' in error: %s", test.got, err.Error())
}
})
}
Expand Down