Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tasks/install_powershell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ if (($collection -like '*puppetcore*-nightly*') -And -Not ($PSBoundParameters.Co
$windows_source = 'https://nightlies.puppet.com/downloads'
} elseif (($collection -like '*puppetcore*') -And -Not ($PSBoundParameters.ContainsKey('windows_source'))) {
$windows_source = 'https://artifacts-puppetcore.puppet.com/v1/download'
if ($version -eq "" -Or !$version) {
Throw "You must provide a version to install the agent from puppetcore on Windows/MacOS."
}
}

if ($absolute_source) {
Expand Down
8 changes: 6 additions & 2 deletions tasks/install_shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -841,11 +841,15 @@ case $platform in
arch="arm64"
fi
if [[ "$collection" =~ "puppetcore" ]]; then
if [[ -z "$version" ]]; then
critical "You must provide a version to install the agent from puppetcore on MacOS/Windows."
exit 1
fi
dots=$(echo "${version}" | grep -o '\.' | wc -l)
if (( dots >= 3 )); then
download_url="${mac_source}?version=${version}&os_name=osx&os_version=${platform_version}&os_arch=${arch}&dev=true"
download_url="${mac_source}?type=native&version=${version}&os_name=osx&os_version=${platform_version}&os_arch=${arch}&dev=true"
else
download_url="${mac_source}?version=${version}&os_name=osx&os_version=${platform_version}&os_arch=${arch}"
download_url="${mac_source}?type=native&version=${version}&os_name=osx&os_version=${platform_version}&os_arch=${arch}"
fi
else
download_url="${mac_source}/mac/${collection}/${platform_version}/${arch}/${filename}"
Expand Down
Loading