mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
pkg: build: do not infer a release if not pushing
If you happen to be exactly on a tag then: $ linuxkit pkg build --dev pkg/init Building "ijc/init:dev" Cannot release "v0.3" if not pushing Do not try and infer a release if not pushing so this is possible again. The subsequent check for `bo.release != "" && !bo.push` remains since the caller could have used `WithRelease` but not `WithPush`. Our CLI never does this, but a hypothetical other user of the library might. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
695a10489b
commit
3be156da13
@ -82,7 +82,7 @@ func (p Pkg) Build(bos ...BuildOpt) error {
|
||||
return fmt.Errorf("Unknown arch %q", arch)
|
||||
}
|
||||
|
||||
if p.git != nil && bo.release == "" {
|
||||
if p.git != nil && bo.push && bo.release == "" {
|
||||
r, err := p.git.commitTag("HEAD")
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user