Skip to content

Commit 00569b5

Browse files
authored
Fix TAG writing in env file (#565)
1 parent d0088a1 commit 00569b5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dependency_updater/dependency_updater.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func createCommitMessage(updatedDependencies []VersionUpdateInfo, repoPath strin
143143
}
144144
commitDescription = strings.TrimSuffix(commitDescription, " ")
145145
commitTitle += strings.Join(repos, ", ")
146-
146+
147147
if githubAction {
148148
err := writeToGithubOutput(commitTitle, commitDescription, repoPath)
149149
if err != nil {
@@ -264,8 +264,6 @@ func getVersionAndCommit(ctx context.Context, client *github.Client, dependencie
264264
diff,
265265
}
266266
}
267-
// For branch tracking, return branch name as the tag
268-
return dependencies[dependencyType].Branch, commit, updatedDependency, nil
269267
}
270268

271269
if version != nil {
@@ -314,6 +312,10 @@ func createVersionsEnv(repoPath string, dependencies Dependencies) error {
314312

315313
dependencyPrefix := strings.ToUpper(dependency)
316314

315+
if dependencies[dependency].Tracking == "branch" {
316+
dependencies[dependency].Tag = dependencies[dependency].Branch
317+
}
318+
317319
envLines = append(envLines, fmt.Sprintf("export %s_%s=%s",
318320
dependencyPrefix, "TAG", dependencies[dependency].Tag))
319321

0 commit comments

Comments
 (0)