mirror of
https://github.com/thegeeklab/wp-gitea-release.git
synced 2024-11-25 09:20:39 +00:00
Fix extraction of tag name from commit ref to handle /
Previously, tags with a `/` character were not correctly handled because `filepath.Base` was used. This would return the last element of path. This change allows for tags like `test/v1.2.3` to work properly by trimming the `refs/tags/` prefix from the commit ref. Issue #24
This commit is contained in:
parent
923189eb1a
commit
b32e6172f5
@ -116,7 +116,7 @@ func (p Plugin) Exec() error {
|
|||||||
Client: client,
|
Client: client,
|
||||||
Owner: p.Repo.Owner,
|
Owner: p.Repo.Owner,
|
||||||
Repo: p.Repo.Name,
|
Repo: p.Repo.Name,
|
||||||
Tag: filepath.Base(p.Commit.Ref),
|
Tag: strings.TrimPrefix(p.Commit.Ref, "refs/tags/"),
|
||||||
Draft: p.Config.Draft,
|
Draft: p.Config.Draft,
|
||||||
Prerelease: p.Config.Prerelease,
|
Prerelease: p.Config.Prerelease,
|
||||||
FileExists: p.Config.FileExists,
|
FileExists: p.Config.FileExists,
|
||||||
|
Loading…
Reference in New Issue
Block a user