feat!: use "~> v2" as default

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker
2024-05-26 14:39:26 -03:00
parent 5742e2a039
commit fea4ca2b14
3 changed files with 27 additions and 5 deletions
+2 -3
View File
@@ -8,9 +8,8 @@ export interface GitHubRelease {
}
export const getRelease = async (distribution: string, version: string): Promise<GitHubRelease> => {
// TODO: change this to ~> v2 on a future major, once goreleaser v2 is out
if (version === 'latest') {
core.warning("You are using 'latest' as default version. Will lock to '~> v1'.");
core.warning("You are using 'latest' as default version. Will lock to '~> v2'.");
return getReleaseTag(distribution, '~> v1');
}
return getReleaseTag(distribution, version);
@@ -18,7 +17,7 @@ export const getRelease = async (distribution: string, version: string): Promise
export const getReleaseTag = async (distribution: string, version: string): Promise<GitHubRelease> => {
if (version === 'nightly') {
return {tag_name: version};
return { tag_name: version };
}
const tag: string = (await resolveVersion(distribution, version)) || version;
const suffix: string = goreleaser.distribSuffix(distribution);