Skip to content

Commit

Permalink
fix(go): go client tag duplication resolved (#1563)
Browse files Browse the repository at this point in the history
## 🧭 What and Why

We have created a new action on go client repo but we are also releasing a tag from this repo as well. So we have duplicate tags on the go client. This needs to be resolved.

### Changes included:

* Action from generated client removed.
* spreadGeneration.ts updated to release go tags with the `v` prefix.

## 🧪 Test
Will be tested with the next release.
  • Loading branch information
mehmetaligok authored May 23, 2023
1 parent d06fb6e commit ed1222f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 32 deletions.
30 changes: 0 additions & 30 deletions clients/algoliasearch-client-go/.github/workflows/release.yml

This file was deleted.

7 changes: 5 additions & 2 deletions scripts/ci/codegen/spreadGeneration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,16 @@ async function spreadGeneration(): Promise<void> {

// In case of a release commit, we also want to update tags on the clients repositories
if (IS_RELEASE_COMMIT) {
// Go needs a 'v' prefix for tags.
const tagVersion = lang === 'go' ? `v${version}` : version;

console.log(
`Processing release commit, creating new release tag ('${version}') for '${lang}' repository.`
);

// we always want to delete the tag in case it exists
await run(`git tag -d ${version} || true`, { cwd: tempGitDir });
await run(`git tag ${version} HEAD`, { cwd: tempGitDir });
await run(`git tag -d ${tagVersion} || true`, { cwd: tempGitDir });
await run(`git tag ${tagVersion} HEAD`, { cwd: tempGitDir });
await run('git push --tags', { cwd: tempGitDir });
}

Expand Down

0 comments on commit ed1222f

Please sign in to comment.