Skip to content

Commit 99e6696

Browse files
committed
1 parent a566061 commit 99e6696

11 files changed

+65
-17
lines changed

Diff for: .circleci/config.yml

+8-13
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,26 @@ workflows:
1212
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
1313
jobs:
1414
build:
15-
environment:
16-
GO111MODULE: "on"
1715
docker:
18-
- image: circleci/golang:1.16
19-
working_directory: /go/src/github.com/alecthomas/chroma
16+
- image: cimg/base:2021.04
2017
steps:
2118
- checkout
22-
- run:
23-
name: Prepare
24-
command: |
25-
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s v1.37.0
26-
mkdir ~/report
27-
when: always
2819
- run:
2920
name: Test
3021
command: |
22+
. ./bin/activate-hermit
3123
go test -v ./...
3224
- run:
3325
name: Lint
3426
command: |
27+
. ./bin/activate-hermit
3528
go build ./...
36-
./bin/golangci-lint run
29+
golangci-lint run
3730
release:
3831
docker:
39-
- image: circleci/golang:1.16
32+
- image: cimg/base:2021.04
4033
steps:
4134
- checkout
42-
- run: curl -sL https://git.io/goreleaser | bash
35+
- run: |
36+
. ./bin/activate-hermit
37+
curl -sL https://git.io/goreleaser | bash

Diff for: bin/.go-1.16.3.pkg

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hermit

Diff for: bin/.golangci-lint-1.37.0.pkg

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hermit

Diff for: bin/README.hermit.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Hermit environment
2+
3+
This is a [Hermit](https://github.com/cashapp/hermit) bin directory.
4+
5+
The symlinks in this directory are managed by Hermit and will automatically
6+
download and install Hermit itself as well as packages. These packages are
7+
local to this environment.

Diff for: bin/activate-hermit

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
# This file must be used with "source bin/activate-hermit" from bash or zsh.
3+
# You cannot run it directly
4+
5+
if [ "${BASH_SOURCE-}" = "$0" ]; then
6+
echo "You must source this script: \$ source $0" >&2
7+
exit 33
8+
fi
9+
10+
BIN_DIR="$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")"
11+
if "${BIN_DIR}/hermit" noop > /dev/null; then
12+
eval "$("${BIN_DIR}/hermit" activate "${BIN_DIR}/..")"
13+
14+
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ]; then
15+
hash -r 2>/dev/null
16+
fi
17+
18+
echo "Hermit environment $("${HERMIT_ENV}"/bin/hermit env HERMIT_ENV) activated"
19+
fi

Diff for: bin/go

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.go-1.16.3.pkg

Diff for: bin/gofmt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.go-1.16.3.pkg

Diff for: bin/golangci-lint

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.golangci-lint-1.37.0.pkg

Diff for: bin/hermit

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
set -eo pipefail
4+
5+
if [ -z "${HERMIT_STATE_DIR}" ]; then
6+
case "$(uname -s)" in
7+
Darwin)
8+
export HERMIT_STATE_DIR="${HOME}/Library/Caches/hermit"
9+
;;
10+
Linux)
11+
export HERMIT_STATE_DIR="${XDG_CACHE_HOME:-${HOME}/.cache}/hermit"
12+
;;
13+
esac
14+
fi
15+
16+
export HERMIT_DIST_URL="${HERMIT_DIST_URL:-https://github.com/cashapp/hermit/releases/download/stable}"
17+
HERMIT_CHANNEL="$(basename "${HERMIT_DIST_URL}")"
18+
export HERMIT_CHANNEL
19+
export HERMIT_EXE=${HERMIT_EXE:-${HERMIT_STATE_DIR}/pkg/hermit@${HERMIT_CHANNEL}/hermit}
20+
21+
if [ ! -x "${HERMIT_EXE}" ]; then
22+
echo "Bootstrapping ${HERMIT_EXE} from ${HERMIT_DIST_URL}" 1>&2
23+
curl -fsSL "${HERMIT_DIST_URL}/install.sh" | /bin/bash 1>&2
24+
fi
25+
26+
exec "${HERMIT_EXE}" --level=fatal exec "$0" -- "$@"

Diff for: bin/hermit.hcl

Whitespace-only changes.

Diff for: go.sum

-4
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@ github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9
1111
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1212
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1313
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
14-
github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk=
15-
github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
1614
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
1715
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
1816
github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE=
1917
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
2018
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
2119
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
22-
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
2320
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
2421
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
2522
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -28,7 +25,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
2825
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
2926
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
3027
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
31-
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
3228
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
3329
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
3430
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=

0 commit comments

Comments
 (0)