File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed
Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -61,12 +61,16 @@ def main():
6161 output_dir = Path (args .output_dir )
6262 output_dir .mkdir (parents = True , exist_ok = True )
6363
64+ if args .git_sha :
65+ url = get_source_url (args .git_sha )
66+ else :
67+ url = get_source_url (args .version )
68+
6469 # Compute checksum if missing
65- checksum = args .checksum
66- if not checksum and args .git_sha :
67- checksum = get_uda_checksum (args .git_sha )
70+ if args .checksum :
71+ checksum = args .checksum
6872 else :
69- checksum = get_uda_checksum ( args . version )
73+ checksum = calculate_checksum_from_url ( url )
7074
7175 # Load template
7276 env = Environment (loader = FileSystemLoader (args .template_dir ), trim_blocks = True , lstrip_blocks = True )
@@ -76,6 +80,7 @@ def main():
7680 rendered = template .render (
7781 version = args .version ,
7882 checksum = checksum ,
83+ source_url = url ,
7984 toolchain_version = args .toolchain_version ,
8085 build_type = args .build_type ,
8186 parallel = args .parallel ,
Original file line number Diff line number Diff line change @@ -9,14 +9,7 @@ description = """Universal Data Access"""
99toolchain = {'name': 'GCC', 'version': '{{ toolchain_version }}'}
1010toolchainopts = {'pic': True}
1111
12- {% set tag_pattern = r '^\d+\.\d+\.\d+$' %}
13-
14- {% if version is match (tag_pattern ) %}
15- source_urls = ['https://github.com/ukaea/UDA/archive/refs/tags']
16- {% else %}
17- source_urls = ['https://github.com/ukaea/UDA/archive/']
18- {% endif %}
19-
12+ source_urls = ['{{ source_url }}']
2013sources = ['%(version)s.zip']
2114checksums = ['{{ checksum }}']
2215
You can’t perform that action at this time.
0 commit comments