Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(go)!: Don't fallback if GOPROXY used (#12407)
Current implementation tries to use GOPROXY and falls back to Renovate fetching mechanism if no releases found. The new one is switches to GOPROXY implementaiton when environment variable is set and doesn't fallback. However, when direct keyword is used, it will use Renovate-native mechanism that fetches directly from GitHub, etc. When off keyword is encountered or no URLs left, we're done with no releases (i.e. no fallback to Renovate-native mechanism). BREAKING CHANGE: Go modules lookups will now no longer fallback to Renovate native lookups if GOPROXY is configured and without "direct" explicitly configured.
- Loading branch information
Showing
6 changed files
with
233 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
import type { GetReleasesConfig, ReleaseResult } from '../types'; | ||
import { getReleases as directReleases } from './releases-direct'; | ||
import * as direct from './releases-direct'; | ||
import * as goproxy from './releases-goproxy'; | ||
|
||
export { id } from './common'; | ||
|
||
export const customRegistrySupport = false; | ||
|
||
export async function getReleases( | ||
export function getReleases( | ||
config: GetReleasesConfig | ||
): Promise<ReleaseResult | null> { | ||
const res = await goproxy.getReleases(config); | ||
if (res) { | ||
return res; | ||
} | ||
|
||
return directReleases(config); | ||
return process.env.GOPROXY | ||
? goproxy.getReleases(config) | ||
: direct.getReleases(config); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.