Skip to content

Commit bd5d9fb

Browse files
authored
Merge pull request #115 from travis-ci/meat-release-prep
Prep for v1.3.0 release
2 parents 79633d4 + 4ce33c3 commit bd5d9fb

File tree

6 files changed

+120
-101
lines changed

6 files changed

+120
-101
lines changed

.testdata/binary-darwin

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,5 @@
7474
1.3.1
7575
1.3
7676
1.2.2
77+
1.10beta2
78+
1.10beta1

.testdata/binary-linux

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,5 @@
7474
1.3.1
7575
1.3
7676
1.2.2
77+
1.10beta2
78+
1.10beta1

.testdata/stubheader-sample

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77
# Instead we include:
88
# * all versions of the current release series
99
# * the last formal release in all previous series
10-
# * at least one beta and rc
1110

1211
#

.travis.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@ sudo: false
33
dist: trusty
44
os:
55
- linux
6-
- osx
6+
# Disabling, potentially permanently, given ongoing sadness :crying_cat_face:
7+
# - osx
78
cache:
89
directories:
910
- "${HOME}/bin"
10-
osx_image: xcode7.3
11+
# Disabling, potentially permanently, given ongoing sadness :crying_cat_face:
12+
# osx_image: xcode7.3
1113
env:
1214
global:
1315
- GIMME_TMP="${TRAVIS_BUILD_DIR}/tmp"
1416
- UNAME="$(uname | tr '[:upper:]' '[:lower:]')"
1517
- GO_BOOTSTRAP_VERSION=1.8.3
1618
- GOPATH="${HOME}/gopath"
1719
- PATH="${HOME}/bin:${PATH}"
18-
- SHELLCHECK_URL="https://s3.amazonaws.com/travis-blue-public/binaries/ubuntu/14.04/x86_64/shellcheck-0.4.6.tar.bz2"
19-
- SHFMT_URL="https://github.com/mvdan/sh/releases/download/v1.3.1/shfmt_v1.3.1_linux_amd64"
20+
- SHELLCHECK_URL="https://www.googleapis.com/download/storage/v1/b/shellcheck/o/shellcheck-v0.4.7.linux.x86_64.tar.xz?alt=media"
21+
- SHFMT_URL="https://github.com/mvdan/sh/releases/download/v2.2.0/shfmt_v2.2.0_linux_amd64"
2022
matrix:
2123
- TARGET=native GO_VERSIONS="$(sed -n -e '/^[^#]/p' < .testdata/sample-binary-$UNAME) $(sed -n -e '/^[^#]/p' < .testdata/source-$UNAME)"
2224
- TARGET=arm GO_VERSIONS="master"
@@ -30,11 +32,12 @@ addons:
3032
before_script:
3133
- mkdir -p "${GIMME_TMP}"
3234
script:
33-
- if [ $UNAME = linux ] && ! shellcheck --version; then
34-
curl -sSL "${SHELLCHECK_URL}" | tar -C "${HOME}/bin" -xjf -;
35+
- if [ $UNAME = linux ] && [[ $(shellcheck --version | awk '/^version:/ { print $2 }') != 0.4.7 ]] ; then
36+
curl -sSL -o "${GIMME_TMP}/shellcheck.tar.xz" "${SHELLCHECK_URL}";
37+
tar -C "${HOME}/bin" --exclude="*.txt" --strip-components=1 -xf "${GIMME_TMP}/shellcheck.tar.xz";
3538
shellcheck --version;
3639
fi
37-
- if [ $UNAME = linux ] && [[ $(shfmt -version 2>/dev/null) != v1.3.1 ]] ; then
40+
- if [ $UNAME = linux ] && [[ $(shfmt -version 2>/dev/null) != v2.2.0 ]] ; then
3841
curl -sSL "${SHFMT_URL}" -o "${HOME}/bin/shfmt";
3942
chmod +x "${HOME}/bin/shfmt";
4043
shfmt -version;

CHANGELOG.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
66

77
### Added
88

9-
- Code of Conduct
10-
119
### Changed
1210

13-
- `1.8` and `1.9` are now build-from-source bootstrapping candidates
14-
1511
### Deprecated
1612

1713
### Removed
@@ -20,6 +16,20 @@ This project adheres to [Semantic Versioning](http://semver.org/).
2016

2117
### Security
2218

19+
## [1.3.0] - 2018-01-17
20+
21+
### Added
22+
23+
- Code of Conduct
24+
25+
### Changed
26+
27+
- `1.8` and `1.9` are now build-from-source bootstrapping candidates
28+
29+
### Fixed
30+
- paginate bucket when fetching 'stable' alias
31+
- account for future 1.1x releases in version regex
32+
2333
## [1.2.0] - 2017-07-09
2434

2535
### Added

gimme

Lines changed: 92 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ set -o pipefail
4949

5050
[[ ${GIMME_DEBUG} ]] && set -x
5151

52-
GIMME_VERSION="v1.2.0"
53-
GIMME_COPYRIGHT="Copyright (c) 2016 Dan Buch, Tianon Gravi, Travis CI GmbH"
54-
GIMME_LICENSE_URL="https://raw.githubusercontent.com/travis-ci/gimme/v1.2.0/LICENSE"
52+
GIMME_VERSION="v1.3.0"
53+
GIMME_COPYRIGHT="Copyright (c) 2015-2018 Dan Buch, Tianon Gravi, Travis CI GmbH"
54+
GIMME_LICENSE_URL="https://raw.githubusercontent.com/travis-ci/gimme/v1.3.0/LICENSE"
5555
export GIMME_VERSION
5656
export GIMME_COPYRIGHT
5757
export GIMME_LICENSE_URL
@@ -152,11 +152,11 @@ _fetch() {
152152
_checkout() {
153153
_fetch "${2}"
154154
(cd "${2}" && {
155-
git reset -q --hard "origin/${1}" \
156-
|| git reset -q --hard "origin/go${1}" \
157-
|| { [ "${1}" = 'tip' ] && git reset -q --hard origin/master; } \
158-
|| git reset -q --hard "refs/tags/${1}" \
159-
|| git reset -q --hard "refs/tags/go${1}"
155+
git reset -q --hard "origin/${1}" ||
156+
git reset -q --hard "origin/go${1}" ||
157+
{ [ "${1}" = 'tip' ] && git reset -q --hard origin/master; } ||
158+
git reset -q --hard "refs/tags/${1}" ||
159+
git reset -q --hard "refs/tags/go${1}"
160160
} 2>/dev/null)
161161
}
162162

@@ -293,18 +293,18 @@ _env_alias() {
293293

294294
_try_existing() {
295295
case "${1}" in
296-
binary)
297-
local existing_ver="${GIMME_VERSION_PREFIX}/go${GIMME_GO_VERSION}.${GIMME_OS}.${GIMME_ARCH}"
298-
local existing_env="${GIMME_ENV_PREFIX}/go${GIMME_GO_VERSION}.${GIMME_OS}.${GIMME_ARCH}.env"
299-
;;
300-
source)
301-
local existing_ver="${GIMME_VERSION_PREFIX}/go${GIMME_GO_VERSION}.src"
302-
local existing_env="${GIMME_ENV_PREFIX}/go${GIMME_GO_VERSION}.src.env"
303-
;;
304-
*)
305-
_try_existing binary || _try_existing source
306-
return $?
307-
;;
296+
binary)
297+
local existing_ver="${GIMME_VERSION_PREFIX}/go${GIMME_GO_VERSION}.${GIMME_OS}.${GIMME_ARCH}"
298+
local existing_env="${GIMME_ENV_PREFIX}/go${GIMME_GO_VERSION}.${GIMME_OS}.${GIMME_ARCH}.env"
299+
;;
300+
source)
301+
local existing_ver="${GIMME_VERSION_PREFIX}/go${GIMME_GO_VERSION}.src"
302+
local existing_env="${GIMME_ENV_PREFIX}/go${GIMME_GO_VERSION}.src.env"
303+
;;
304+
*)
305+
_try_existing binary || _try_existing source
306+
return $?
307+
;;
308308
esac
309309

310310
if [[ -x "${existing_ver}/bin/go" && -s "${existing_env}" ]]; then
@@ -398,6 +398,7 @@ _list_versions() {
398398
}
399399

400400
_list_known() {
401+
# shellcheck disable=SC1117
401402
local exp="go([[:alnum:]\.]*)\.src.*" # :alnum: catches beta versions too
402403
local list="${GIMME_TMP}/known-versions"
403404

@@ -408,6 +409,7 @@ _list_known() {
408409

409410
while read -r line; do
410411
if [[ "${line}" =~ ${exp} ]]; then
412+
# shellcheck disable=SC1117
411413
known="$known\n${BASH_REMATCH[1]}"
412414
fi
413415
done <"${list}"
@@ -451,6 +453,7 @@ _update_stable() {
451453

452454
while nextPageToken=$(jq --exit-status --raw-output '.nextPageToken' <"$tmp_versions"); do
453455
_do_curl "${url}&pageToken=${nextPageToken}" "${tmp_versions}"
456+
# shellcheck disable=SC1117
454457
vers="${vers}\n$(jq -r '.items[].name | capture("go(?<ver>[[:digit:]\\.]*)\\.src.*").ver' <"$tmp_versions")"
455458
done
456459

@@ -461,12 +464,12 @@ _update_stable() {
461464
_stat_unix() {
462465
local filename="${1}"
463466
case "${GIMME_HOSTOS}" in
464-
darwin | *bsd)
465-
stat -f %a "${filename}"
466-
;;
467-
linux)
468-
stat -c %Y "${filename}"
469-
;;
467+
darwin | *bsd)
468+
stat -f %a "${filename}"
469+
;;
470+
linux)
471+
stat -c %Y "${filename}"
472+
;;
470473
esac
471474
}
472475

@@ -503,24 +506,24 @@ _exclude_from_backups() {
503506
# Please avoid anything which requires elevated privileges or is obnoxious
504507
# enough to offend the invoker
505508
case "${GIMME_HOSTOS}" in
506-
darwin)
507-
# Darwin: Time Machine is "standard", we can add others. The default
508-
# mechanism is sticky, as an attribute on the dir, requires no
509-
# privileges, is idempotent (and doesn't support -- to end flags).
510-
tmutil addexclusion "$@"
511-
;;
509+
darwin)
510+
# Darwin: Time Machine is "standard", we can add others. The default
511+
# mechanism is sticky, as an attribute on the dir, requires no
512+
# privileges, is idempotent (and doesn't support -- to end flags).
513+
tmutil addexclusion "$@"
514+
;;
512515
esac
513516
}
514517

515518
_versint() {
516-
local args=(${1//[^0-9]/ })
519+
IFS=" " read -r -a args <<<"${1//[^0-9]/ }"
517520
printf '1%03d%03d%03d%03d' "${args[@]}"
518521
}
519522

520523
_to_goarch() {
521524
case "${1}" in
522-
aarch64) echo "arm64" ;;
523-
*) echo "${1}" ;;
525+
aarch64) echo "arm64" ;;
526+
*) echo "${1}" ;;
524527
esac
525528
}
526529

@@ -539,12 +542,12 @@ _to_goarch() {
539542

540543
# The version prefix must be an absolute path
541544
case "${GIMME_VERSION_PREFIX}" in
542-
/*) true ;;
543-
*)
544-
echo >&2 " Fixing GIMME_VERSION_PREFIX from relative: $GIMME_VERSION_PREFIX"
545-
GIMME_VERSION_PREFIX="$(pwd)/${GIMME_VERSION_PREFIX}"
546-
echo >&2 " to: $GIMME_VERSION_PREFIX"
547-
;;
545+
/*) true ;;
546+
*)
547+
echo >&2 " Fixing GIMME_VERSION_PREFIX from relative: $GIMME_VERSION_PREFIX"
548+
GIMME_VERSION_PREFIX="$(pwd)/${GIMME_VERSION_PREFIX}"
549+
echo >&2 " to: $GIMME_VERSION_PREFIX"
550+
;;
548551
esac
549552

550553
if [[ "${GIMME_OS}" == mingw* ]]; then
@@ -560,40 +563,40 @@ fi
560563

561564
while [[ $# -gt 0 ]]; do
562565
case "${1}" in
563-
-h | --help | help | wat)
564-
_old_ifs="$IFS"
565-
IFS=';'
566-
awk '/^#\+ / {
566+
-h | --help | help | wat)
567+
_old_ifs="$IFS"
568+
IFS=';'
569+
awk '/^#\+ / {
567570
sub(/^#\+ /, "", $0) ;
568571
sub(/-$/, "", $0) ;
569572
print $0
570573
}' "$0" | while read -r line; do
571-
eval "echo \"$line\""
572-
done
573-
IFS="$_old_ifs"
574-
exit 0
575-
;;
576-
-V | --version | version)
577-
echo "${GIMME_VERSION}"
578-
exit 0
579-
;;
580-
-l | --list | list)
581-
_list_versions
582-
exit 0
583-
;;
584-
-k | --known | known)
585-
_list_known
586-
exit 0
587-
;;
588-
-f | --force | force)
589-
force=1
590-
;;
591-
-i | install)
592-
true # ignore a dummy argument
593-
;;
594-
*)
595-
break
596-
;;
574+
eval "echo \"$line\""
575+
done
576+
IFS="$_old_ifs"
577+
exit 0
578+
;;
579+
-V | --version | version)
580+
echo "${GIMME_VERSION}"
581+
exit 0
582+
;;
583+
-l | --list | list)
584+
_list_versions
585+
exit 0
586+
;;
587+
-k | --known | known)
588+
_list_known
589+
exit 0
590+
;;
591+
-f | --force | force)
592+
force=1
593+
;;
594+
-i | install)
595+
true # ignore a dummy argument
596+
;;
597+
*)
598+
break
599+
;;
597600
esac
598601
shift
599602
done
@@ -606,26 +609,26 @@ if [[ -n "${2}" ]]; then
606609
fi
607610

608611
case "${GIMME_ARCH}" in
609-
x86_64) GIMME_ARCH=amd64 ;;
610-
x86) GIMME_ARCH=386 ;;
611-
arm64)
612-
if [[ "${GIMME_GO_VERSION}" != master && "$(_versint "${GIMME_GO_VERSION}")" < "$(_versint 1.5)" ]]; then
613-
echo >&2 "error: ${GIMME_ARCH} is not supported by this go version"
614-
echo >&2 "try go1.5 or newer"
615-
exit 1
616-
fi
617-
if [[ "${GIMME_HOSTOS}" == "linux" && "${GIMME_HOSTARCH}" != "${GIMME_ARCH}" ]]; then
618-
: "${GIMME_CC_FOR_TARGET:="aarch64-linux-gnu-gcc"}"
619-
fi
620-
;;
621-
arm*) GIMME_ARCH=arm ;;
612+
x86_64) GIMME_ARCH=amd64 ;;
613+
x86) GIMME_ARCH=386 ;;
614+
arm64)
615+
if [[ "${GIMME_GO_VERSION}" != master && "$(_versint "${GIMME_GO_VERSION}")" < "$(_versint 1.5)" ]]; then
616+
echo >&2 "error: ${GIMME_ARCH} is not supported by this go version"
617+
echo >&2 "try go1.5 or newer"
618+
exit 1
619+
fi
620+
if [[ "${GIMME_HOSTOS}" == "linux" && "${GIMME_HOSTARCH}" != "${GIMME_ARCH}" ]]; then
621+
: "${GIMME_CC_FOR_TARGET:="aarch64-linux-gnu-gcc"}"
622+
fi
623+
;;
624+
arm*) GIMME_ARCH=arm ;;
622625
esac
623626

624627
case "${GIMME_HOSTARCH}" in
625-
x86_64) GIMME_HOSTARCH=amd64 ;;
626-
x86) GIMME_HOSTARCH=386 ;;
627-
arm64) ;;
628-
arm*) GIMME_HOSTARCH=arm ;;
628+
x86_64) GIMME_HOSTARCH=amd64 ;;
629+
x86) GIMME_HOSTARCH=386 ;;
630+
arm64) ;;
631+
arm*) GIMME_HOSTARCH=arm ;;
629632
esac
630633

631634
if [[ "${GIMME_GO_VERSION}" == "stable" ]]; then
@@ -665,7 +668,7 @@ if ! case "${GIMME_TYPE}" in
665668
echo >&2 " Try 'auto', 'binary', 'source', or 'git'."
666669
exit 1
667670
;;
668-
esac; then
671+
esac; then
669672
echo >&2 "I don't have any idea what to do with '${GIMME_GO_VERSION}'."
670673
echo >&2 " (using type '${GIMME_TYPE}')"
671674
exit 1

0 commit comments

Comments
 (0)