This repository was archived by the owner on Feb 13, 2025. It is now read-only.
File tree 3 files changed +21
-21
lines changed
3 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -52,26 +52,26 @@ parts:
52
52
snapcraftctl set-grade "stable"
53
53
override-build : |
54
54
file="./version.txt"
55
+ buildinfo=$(curl -s -L https://aka.ms/pwsh-buildinfo-7-4)
56
+ baseurl=$(echo $buildinfo | jq -r .BaseUrl)
55
57
if [ -f "$file" ]
56
58
then
57
59
echo "using version file"
58
60
version=$(cat $file)
59
61
else
60
62
echo "getting latest version from GitHub"
61
- version=$(curl -s -L https://aka.ms/pwsh- buildinfo-7-4 | jq -r .ReleaseTag | sed 's/v//')
63
+ version=$(echo $ buildinfo | jq -r .ReleaseTag | sed 's/v//')
62
64
echo "Writing version to file"
63
65
echo $version > $file
64
66
fi
65
- container=$(echo v$version| sed 's/\./-/g')
66
- echo "getting powershell $version - $container"
67
- # These urls are subject to change.
67
+ echo "getting powershell $version - $baseurl/v$version"
68
68
case "$SNAPCRAFT_ARCH_TRIPLET" in
69
69
aarch64-linux-gnu)
70
- curl -L -o powershell.tar.gz https://pscoretestdata.blob.core.windows.net/$container /powershell-$version-linux-arm64.tar.gz ;;
70
+ curl -L -o powershell.tar.gz $baseurl/v$version /powershell-$version-linux-arm64.tar.gz ;;
71
71
arm-linux-gnueabihf)
72
- curl -L -o powershell.tar.gz https://pscoretestdata.blob.core.windows.net/$container /powershell-$version-linux-arm32.tar.gz ;;
72
+ curl -L -o powershell.tar.gz $baseurl/v$version /powershell-$version-linux-arm32.tar.gz ;;
73
73
x86_64-linux-gnu)
74
- curl -L -o powershell.tar.gz https://pscoretestdata.blob.core.windows.net/$container /powershell-$version-linux-x64.tar.gz ;;
74
+ curl -L -o powershell.tar.gz $baseurl/v$version /powershell-$version-linux-x64.tar.gz ;;
75
75
*)
76
76
# fail because we don't have a build for the requested platform
77
77
echo "The $SNAPCRAFT_ARCH_TRIPLET platform does not have an available build. Exiting."
Original file line number Diff line number Diff line change @@ -50,26 +50,26 @@ parts:
50
50
snapcraftctl set-grade "stable"
51
51
override-build : |
52
52
file="./version.txt"
53
+ buildinfo=$(curl -s -L https://aka.ms/pwsh-buildinfo-preview)
54
+ baseurl=$(echo $buildinfo | jq -r .BaseUrl)
53
55
if [ -f "$file" ]
54
56
then
55
57
echo "using version file"
56
58
version=$(cat $file)
57
59
else
58
60
echo "getting latest version from GitHub"
59
- version=$(curl -s -L https://aka.ms/pwsh- buildinfo-preview | jq -r .ReleaseTag | sed 's/v//')
61
+ version=$(echo $ buildinfo | jq -r .ReleaseTag | sed 's/v//')
60
62
echo "Writing version to file"
61
63
echo $version > $file
62
64
fi
63
- container=$(echo v$version| sed 's/\./-/g')
64
- echo "getting powershell $version - $container"
65
- # These urls are subject to change.
65
+ echo "getting powershell $version - $baseurl/v$version"
66
66
case "$SNAPCRAFT_ARCH_TRIPLET" in
67
67
aarch64-linux-gnu)
68
- curl -L -o powershell.tar.gz https://pscoretestdata.blob.core.windows.net/$container /powershell-$version-linux-arm64.tar.gz ;;
68
+ curl -L -o powershell.tar.gz $baseurl/v$version /powershell-$version-linux-arm64.tar.gz ;;
69
69
arm-linux-gnueabihf)
70
- curl -L -o powershell.tar.gz https://pscoretestdata.blob.core.windows.net/$container /powershell-$version-linux-arm32.tar.gz ;;
70
+ curl -L -o powershell.tar.gz $baseurl/v$version /powershell-$version-linux-arm32.tar.gz ;;
71
71
x86_64-linux-gnu)
72
- curl -L -o powershell.tar.gz https://pscoretestdata.blob.core.windows.net/$container /powershell-$version-linux-x64.tar.gz ;;
72
+ curl -L -o powershell.tar.gz $baseurl/v$version /powershell-$version-linux-x64.tar.gz ;;
73
73
*)
74
74
# fail because we don't have a build for the requested platform
75
75
echo "The $SNAPCRAFT_ARCH_TRIPLET platform does not have an available build. Exiting."
Original file line number Diff line number Diff line change @@ -52,26 +52,26 @@ parts:
52
52
snapcraftctl set-grade "stable"
53
53
override-build : |
54
54
file="./version.txt"
55
+ buildinfo=$(curl -s -L https://aka.ms/pwsh-buildinfo-7-4)
56
+ baseurl=$(echo $buildinfo | jq -r .BaseUrl)
55
57
if [ -f "$file" ]
56
58
then
57
59
echo "using version file"
58
60
version=$(cat $file)
59
61
else
60
62
echo "getting latest version from GitHub"
61
- version=$(curl -s -L https://aka.ms/pwsh- buildinfo-7-4 | jq -r .ReleaseTag | sed 's/v//')
63
+ version=$(echo $ buildinfo | jq -r .ReleaseTag | sed 's/v//')
62
64
echo "Writing version to file"
63
65
echo $version > $file
64
66
fi
65
- container=$(echo v$version| sed 's/\./-/g')
66
- echo "getting powershell $version - $container"
67
- # These urls are subject to change.
67
+ echo "getting powershell $version - $baseurl/v$version"
68
68
case "$SNAPCRAFT_ARCH_TRIPLET" in
69
69
aarch64-linux-gnu)
70
- curl -L -o powershell.tar.gz https://pscoretestdata.blob.core.windows.net/$container /powershell-$version-linux-arm64.tar.gz ;;
70
+ curl -L -o powershell.tar.gz $baseurl/v$version /powershell-$version-linux-arm64.tar.gz ;;
71
71
arm-linux-gnueabihf)
72
- curl -L -o powershell.tar.gz https://pscoretestdata.blob.core.windows.net/$container /powershell-$version-linux-arm32.tar.gz ;;
72
+ curl -L -o powershell.tar.gz $baseurl/v$version /powershell-$version-linux-arm32.tar.gz ;;
73
73
x86_64-linux-gnu)
74
- curl -L -o powershell.tar.gz https://pscoretestdata.blob.core.windows.net/$container /powershell-$version-linux-x64.tar.gz ;;
74
+ curl -L -o powershell.tar.gz $baseurl/v$version /powershell-$version-linux-x64.tar.gz ;;
75
75
*)
76
76
# fail because we don't have a build for the requested platform
77
77
echo "The $SNAPCRAFT_ARCH_TRIPLET platform does not have an available build. Exiting."
You can’t perform that action at this time.
0 commit comments