Skip to content

Commit 15465bc

Browse files
committed
fetch bin/lein and co from codeberg instead of gh
1 parent 4c7a6f6 commit 15465bc

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

dist/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,14 +1162,15 @@ function setup(version, githubAuth) {
11621162
else {
11631163
// Resolve 'latest' to actual version number
11641164
const resolvedVersion = version === 'latest' ? yield getLatestVersion(githubAuth) : version;
1165+
const resolvedSourceType = version === 'latest' ? 'branch/stable' : `tag/${version}`;
11651166
const binScripts = [];
11661167
if (utils.isWindows()) {
11671168
for (const ext of ['ps1', 'bat']) {
1168-
binScripts.push(yield tc.downloadTool(`https://raw.githubusercontent.com/technomancy/leiningen/${version === 'latest' ? 'stable' : version}/bin/lein.${ext}`, path.join(utils.getTempDir(), `lein.${ext}`), githubAuth));
1169+
binScripts.push(yield tc.downloadTool(`https://codeberg.org/leiningen/leiningen/raw/${resolvedSourceType}/bin/lein.${ext}`, path.join(utils.getTempDir(), `lein.${ext}`), githubAuth));
11691170
}
11701171
}
11711172
else {
1172-
binScripts.push(yield tc.downloadTool(`https://raw.githubusercontent.com/technomancy/leiningen/${version === 'latest' ? 'stable' : version}/bin/lein`, path.join(utils.getTempDir(), 'lein'), githubAuth));
1173+
binScripts.push(yield tc.downloadTool(`https://raw.githubusercontent.com/technomancy/leiningen/${resolvedSourceType}/bin/lein`, path.join(utils.getTempDir(), 'lein'), githubAuth));
11731174
}
11741175
const jarPath = yield downloadStandaloneJar(resolvedVersion, githubAuth);
11751176
const tempDir = path.join(utils.getTempDir(), `temp_${Math.floor(Math.random() * 2000000000)}`);

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/leiningen.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ export async function setup(
6767
// Resolve 'latest' to actual version number
6868
const resolvedVersion =
6969
version === 'latest' ? await getLatestVersion(githubAuth) : version
70+
const resolvedSourceType =
71+
version === 'latest' ? 'branch/stable' : `tag/${version}`
7072

7173
const binScripts = []
7274
if (utils.isWindows()) {
7375
for (const ext of ['ps1', 'bat']) {
7476
binScripts.push(
7577
await tc.downloadTool(
76-
`https://raw.githubusercontent.com/technomancy/leiningen/${
77-
version === 'latest' ? 'stable' : version
78-
}/bin/lein.${ext}`,
78+
`https://codeberg.org/leiningen/leiningen/raw/${resolvedSourceType}/bin/lein.${ext}`,
7979
path.join(utils.getTempDir(), `lein.${ext}`),
8080
githubAuth
8181
)
@@ -84,9 +84,7 @@ export async function setup(
8484
} else {
8585
binScripts.push(
8686
await tc.downloadTool(
87-
`https://raw.githubusercontent.com/technomancy/leiningen/${
88-
version === 'latest' ? 'stable' : version
89-
}/bin/lein`,
87+
`https://codeberg.org/leiningen/leiningen/raw/${resolvedSourceType}/bin/lein`,
9088
path.join(utils.getTempDir(), 'lein'),
9189
githubAuth
9290
)

0 commit comments

Comments
 (0)