Skip to content

Commit 984afec

Browse files
authored
#67: Remove deprecated --tag option
1 parent 6d5ef4c commit 984afec

File tree

6 files changed

+2
-33
lines changed

6 files changed

+2
-33
lines changed

action.add.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ action:
2525
description: Reference of the package source
2626
type: string
2727
default: ""
28-
- name: tag
29-
title: Tag
30-
description: Tag of the package source
31-
type: string
32-
default: ""
3328
- name: url
3429
title: URL
3530
description: URL of the package source

action.update.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ action:
2020
description: Reference of the package source
2121
type: string
2222
default: ""
23-
- name: tag
24-
title: Tag
25-
description: Tag of the package source
26-
type: string
27-
default: ""
2823
- name: url
2924
title: URL
3025
description: URL of the package source

compose/compose.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,6 @@ func (c *Composer) RunInstall() error {
158158
}
159159

160160
func (c *Composer) prepareInstall(clean bool) (string, string, error) {
161-
for _, dep := range c.compose.Dependencies {
162-
if dep.Source.Tag != "" {
163-
c.Term().Warning().Printfln("found deprecated field `tag` in `%s` dependency. Use `ref` field for tags or branches.", dep.Name)
164-
}
165-
}
166-
167161
buildPath := c.getPath(BuildDir)
168162
packagesPath := c.getPath(c.options.WorkingDir)
169163

compose/yaml.go

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ type Source struct {
4949
Type string `yaml:"type"`
5050
URL string `yaml:"url"`
5151
Ref string `yaml:"ref,omitempty"`
52-
Tag string `yaml:"tag,omitempty"`
5352
Strategies []Strategy `yaml:"strategy,omitempty"`
5453
}
5554

@@ -93,18 +92,7 @@ func (p *Package) GetURL() string {
9392

9493
// GetRef from package source
9594
func (p *Package) GetRef() string {
96-
ref := p.Source.Ref
97-
if ref == "" && p.GetTag() != "" {
98-
ref = p.GetTag()
99-
}
100-
101-
return ref
102-
}
103-
104-
// GetTag from package source.
105-
// Deprecated: use [Package.GetRef]
106-
func (p *Package) GetTag() string {
107-
return p.Source.Tag
95+
return p.Source.Ref
10896
}
10997

11098
// GetTarget returns a target version of package

example/compose.example.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ dependencies:
66
type: git
77
url: https://github.com/example/compose-example.git
88
# ref: branch-name
9-
# tag: tag-name
10-
strategy: null # In case of conflicting file, default strategy is that local file is selected and package file ignored when composing
9+
strategy: null # In case of conflicting file, default strategy is that local file is selected and package file ignored when composing
1110

1211
- name: package-2
1312
source:
1413
type: git
1514
url: https://github.com/example/compose-example.git
1615
# ref: branch-name
17-
# tag: tag-name
1816
strategy:
1917
- name: overwrite-local-file # Works with files only.
2018
path: interaction/file-present-in-package-and-domain < File from package will override file from domain

plugin.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ func getInputDependencies(input *action.Input) *compose.Dependency {
162162
Source: compose.Source{
163163
Type: input.Opt("type").(string),
164164
Ref: input.Opt("ref").(string),
165-
Tag: input.Opt("tag").(string),
166165
URL: input.Opt("url").(string),
167166
},
168167
}

0 commit comments

Comments
 (0)