|
10 | 10 | is-composite-runtime (optional): Whether to install aspnetcore composite version ^ |
11 | 11 |
|
12 | 12 | set dotnetVersion to join(slice(split(PRODUCT_VERSION, "."), 0, 2), ".") ^ |
13 | | - set isAlpine to find(OS_VERSION, "alpine") >= 0 ^ |
14 | | - set varPlatform to when(isAlpine, "linux-musl", "linux") ^ |
15 | | - set runtimeVersionDir to when(ARGS["use-local-version-var"], |
16 | | - "$dotnet_version", |
17 | | - when(ARGS["is-internal"], |
18 | | - VARIABLES[cat("runtime|", dotnetVersion, "|build-version")], |
19 | | - "$DOTNET_VERSION")) ^ |
20 | | - set aspnetCompositeVersionDir to when(ARGS["use-local-version-var"], |
21 | | - "$aspnetcore_version", |
22 | | - when(ARGS["is-internal"], |
| 13 | + set productVersion to VARIABLES[cat("dotnet|", dotnetVersion, "|product-version")] ^ |
| 14 | + set buildVersion to |
| 15 | + when(ARGS["is-composite-runtime"], |
23 | 16 | VARIABLES[cat("aspnet|", dotnetVersion, "|build-version")], |
24 | | - "$ASPNET_VERSION")) ^ |
25 | | - set isStableBranding to (find(VARIABLES[cat("sdk|", dotnetVersion, "|build-version")], "-servicing") >= 0 || |
26 | | - find(VARIABLES[cat("sdk|", dotnetVersion, "|build-version")], "-rtm") >= 0) ^ |
27 | | - set runtimeVersionFile to when(isStableBranding, |
28 | | - VARIABLES[cat("dotnet|", dotnetVersion, "|product-version")], |
29 | | - runtimeVersionDir) ^ |
30 | | - set aspnetCompositeVersionFile to when(isStableBranding, |
31 | | - VARIABLES[cat("dotnet|", dotnetVersion, "|product-version")], |
32 | | - aspnetCompositeVersionDir) ^ |
33 | | - set filePlatform to when(isAlpine, "-linux-musl", "-linux") ^ |
| 17 | + VARIABLES[cat("runtime|", dotnetVersion, "|build-version")]) ^ |
| 18 | + |
| 19 | + set isAlpine to find(OS_VERSION, "alpine") >= 0 ^ |
| 20 | + set platform to when(isAlpine, "linux-musl", "linux") ^ |
| 21 | + |
| 22 | + set versionDir to |
| 23 | + when(ARGS["is-composite-runtime"], |
| 24 | + when(ARGS["use-local-version-var"], |
| 25 | + "$aspnetcore_version", |
| 26 | + "$ASPNET_VERSION"), |
| 27 | + when(ARGS["use-local-version-var"], |
| 28 | + "$dotnet_version", |
| 29 | + "$DOTNET_VERSION")) ^ |
| 30 | + |
| 31 | + set sdkBuildVersion to VARIABLES[cat("sdk|", dotnetVersion, "|build-version")] ^ |
| 32 | + set isStableBranding to find(sdkBuildVersion, "-servicing") >= 0 || find(sdkBuildVersion, "-rtm") >= 0 ^ |
| 33 | + |
| 34 | + set fileVersion to when(isStableBranding, productVersion, versionDir) ^ |
| 35 | + |
| 36 | + _ This is specific to the layout of the staging storage account blob containers. ^ |
| 37 | + if (ARGS["is-internal"]):{{ |
| 38 | + set versionDir to buildVersion ^ |
| 39 | + set fileVersion to productVersion |
| 40 | + }} ^ |
| 41 | + |
34 | 42 | set baseUrl to VARIABLES[cat("dotnet|", dotnetVersion, "|base-url|", VARIABLES["branch"])] ^ |
35 | | - set runtimeBaseUrl to cat(baseUrl, "/Runtime/", runtimeVersionDir, "/") ^ |
36 | | - set aspnetCompositeUrl to cat(baseUrl, "/aspnetcore/Runtime/", aspnetCompositeVersionDir, "/aspnetcore-runtime-composite-", aspnetCompositeVersionFile, |
37 | | - filePlatform, "-", ARCH_SHORT, ".tar.gz") ^ |
38 | | - set files to when(ARGS["is-composite-runtime"], |
39 | | - [ |
40 | | - [ |
41 | | - "filename": "dotnet.tar.gz", |
42 | | - "url": aspnetCompositeUrl, |
43 | | - "sha": VARIABLES[join(["aspnet-composite", dotnetVersion, varPlatform, ARCH_SHORT, "sha"], "|")], |
44 | | - "sha-var-name": "dotnet_sha512" |
45 | | - ] |
46 | | - ], |
| 43 | + set downloadUrl to |
| 44 | + when(ARGS["is-composite-runtime"], |
| 45 | + cat(baseUrl, "/aspnetcore/Runtime/", versionDir, "/aspnetcore-runtime-composite-", fileVersion, "-", platform, "-", ARCH_SHORT, ".tar.gz"), |
| 46 | + cat(baseUrl, "/Runtime/", versionDir, "/dotnet-runtime-", fileVersion, "-", platform, "-", ARCH_SHORT, ".tar.gz")) ^ |
| 47 | + set sha to |
| 48 | + when(ARGS["is-composite-runtime"], |
| 49 | + VARIABLES[join(["aspnet-composite", dotnetVersion, platform, ARCH_SHORT, "sha"], "|")], |
| 50 | + VARIABLES[join(["runtime", dotnetVersion, platform, ARCH_SHORT, "sha"], "|")]) ^ |
| 51 | + |
| 52 | + set files to |
47 | 53 | [ |
48 | 54 | [ |
49 | 55 | "filename": "dotnet.tar.gz", |
50 | | - "url": cat(runtimeBaseUrl, "dotnet-runtime-", runtimeVersionFile, "-", varPlatform, "-", ARCH_SHORT, ".tar.gz"), |
51 | | - "sha": VARIABLES[join(["runtime", dotnetVersion, varPlatform, ARCH_SHORT, "sha"], "|")], |
| 56 | + "url": downloadUrl, |
| 57 | + "sha": sha, |
52 | 58 | "sha-var-name": "dotnet_sha512" |
53 | 59 | ] |
54 | | - ]) ^ |
| 60 | + ] ^ |
| 61 | + |
55 | 62 | set copyEnabled to ARGS["install-method"] = "copy-and-install" ^ |
56 | 63 | set downloadEnabled to ARGS["install-method"] = "download" || ARGS["install-method"] = "download-and-install" ^ |
57 | 64 | set installEnabled to ARGS["install-method"] = "download-and-install" || ARGS["install-method"] = "copy-and-install" |
|
0 commit comments