mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-07-01 15:35:45 +00:00
stackage: fix url substitution
Fixes https://github.com/tuna/issues/issues/1379
This commit is contained in:
parent
7f47e5cbc0
commit
0775ccadbc
@ -16,6 +16,7 @@ BASE_URL = os.getenv("TUNASYNC_UPSTREAM_URL", "https://api.github.com/repos/")
|
|||||||
WORKING_DIR = os.getenv("TUNASYNC_WORKING_DIR")
|
WORKING_DIR = os.getenv("TUNASYNC_WORKING_DIR")
|
||||||
REPOS = [
|
REPOS = [
|
||||||
# owner/repo, tree, tree, tree, blob
|
# owner/repo, tree, tree, tree, blob
|
||||||
|
## for stackage
|
||||||
["fpco/minghc", "master", "bin", "7z.exe"],
|
["fpco/minghc", "master", "bin", "7z.exe"],
|
||||||
["fpco/minghc", "master", "bin", "7z.dll"],
|
["fpco/minghc", "master", "bin", "7z.dll"],
|
||||||
]
|
]
|
||||||
|
17
stackage.py
17
stackage.py
@ -53,12 +53,23 @@ class StackageSession(object):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if 'msys2' in d:
|
if 'msys2' in d:
|
||||||
for os in d['msys2']:
|
if 'windows32' in d['msys2']:
|
||||||
print(os)
|
print('windows32')
|
||||||
d['msys2'][os]['url'] = d['msys2'][os]['url'].replace(
|
d['msys2']['windows32']['url'] = d['msys2']['windows32']['url'].replace(
|
||||||
'https://github.com/fpco/stackage-content/releases/download/',
|
'https://github.com/fpco/stackage-content/releases/download/',
|
||||||
|
'https://mirrors.tuna.tsinghua.edu.cn/github-release/commercialhaskell/stackage-content/msys2-')
|
||||||
|
if 'windows64' in d['msys2']:
|
||||||
|
print('windows64')
|
||||||
|
d['msys2']['windows64']['url'] = d['msys2']['windows64']['url'].replace(
|
||||||
|
'https://github.com/commercialhaskell/stackage-content/releases/download/',
|
||||||
'https://mirrors.tuna.tsinghua.edu.cn/github-release/commercialhaskell/stackage-content/')
|
'https://mirrors.tuna.tsinghua.edu.cn/github-release/commercialhaskell/stackage-content/')
|
||||||
|
|
||||||
|
if 'sevenzexe-info' in d:
|
||||||
|
d['sevenzexe-info']['url'] = 'https://mirrors.tuna.tsinghua.edu.cn/github-raw/fpco/minghc/master/bin/7z.exe'
|
||||||
|
|
||||||
|
if 'sevenzdll-info' in d:
|
||||||
|
d['sevenzdll-info']['url'] = 'https://mirrors.tuna.tsinghua.edu.cn/github-raw/fpco/minghc/master/bin/7z.dll'
|
||||||
|
|
||||||
for i in ['portable-git', 'stack', 'ghcjs']:
|
for i in ['portable-git', 'stack', 'ghcjs']:
|
||||||
del d[i]
|
del d[i]
|
||||||
with open(self._base_path / 'stack-setup.yaml', 'w') as f:
|
with open(self._base_path / 'stack-setup.yaml', 'w') as f:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user