Skip to content
Merged
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
14 changes: 11 additions & 3 deletions hack/get-crdoc.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/sh
set -e
# Code generated by godownloader on 2021-01-17T23:56:48Z. DO NOT EDIT.
#
# Code generated by godownloader on 2021-01-17T23:56:48Z.
# Code has been adapted since then to handle project-specific edge cases:
# - From version 0.6.2, versions do not appear anymore in the tar.gz artifact name.

usage() {
this=$1
Expand Down Expand Up @@ -119,6 +120,10 @@ adjust_arch() {
true
}

is_lte_0_6_2() {
[ "$(printf '%s\n%s\n' "$1" "0.6.2" | sort -t. -k1,1n -k2,2n -k3,3n | tail -n 1)" = "0.6.2" ]
}

cat /dev/null <<EOF
------------------------------------------------------------------------
https://github.com/client9/shlib - portable posix shell functions
Expand Down Expand Up @@ -382,7 +387,10 @@ adjust_arch

log_info "found version: ${VERSION} for ${TAG}/${OS}/${ARCH}"

NAME=${PROJECT_NAME}_${VERSION}_${OS}_${ARCH}
NAME=${PROJECT_NAME}_${OS}_${ARCH}
if is_lte_0_6_2 "${VERSION}"; then
NAME=${PROJECT_NAME}_${VERSION}_${OS}_${ARCH}
fi
TARBALL=${NAME}.${FORMAT}
TARBALL_URL=${GITHUB_DOWNLOAD}/${TAG}/${TARBALL}
CHECKSUM=checksums.txt
Expand Down
Loading