File tree 6 files changed +34
-12
lines changed
6 files changed +34
-12
lines changed Original file line number Diff line number Diff line change
1
+ # GOOS variable for your local development; since the Go docker images are
2
+ # Linux based, in case you are developing on MacOS you must uncomment the line below.
3
+ #GOOS=darwin
4
+
5
+ # GOARCH the architecture to be used for kool run compile script.
6
+ #GOARCH=amd64
Original file line number Diff line number Diff line change 1
1
/kool
2
2
/dist /
3
+ /.env
3
4
4
5
# IDE
5
6
.vscode /
Original file line number Diff line number Diff line change 1
1
FROM docker/compose:alpine-1.26.2 AS docker-compose
2
- FROM golang:1.14 AS build
2
+ FROM golang:1.15.0 AS build
3
3
4
4
WORKDIR /app
5
5
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ if [ -f .env ]; then
4
+ source .env
5
+ fi
6
+
7
+ GO_IMAGE=${GO_IMAGE:- golang: 1.15.0}
8
+
3
9
rm -rf dist
4
10
mkdir -p dist
5
11
6
12
echo " Building to GOOS=darwin GOARCH=amd64"
7
13
8
- docker run --rm --env GOOS=darwin --env GOARCH=amd64 --env CGO_ENABLED=0 -v $( pwd) :/code -w /code golang:1.14 go build -a -tags ' osusergo netgo static_build' -ldflags ' -extldflags "-static"' -o dist/kool-darwin-x86_64
14
+ docker run --rm --env GOOS=darwin --env GOARCH=amd64 --env CGO_ENABLED=0 -v $( pwd) :/code -w /code $GO_IMAGE go build -a -tags ' osusergo netgo static_build' -ldflags ' -extldflags "-static"' -o dist/kool-darwin-x86_64
9
15
10
16
echo " Building to GOOS=linux GOARCH=amd64"
11
17
12
- docker run --rm --env GOOS=linux --env GOARCH=amd64 --env CGO_ENABLED=0 -v $( pwd) :/code -w /code golang:1.14 go build -a -tags ' osusergo netgo static_build' -ldflags ' -extldflags "-static"' -o dist/kool-linux-x86_64
18
+ docker run --rm --env GOOS=linux --env GOARCH=amd64 --env CGO_ENABLED=0 -v $( pwd) :/code -w /code $GO_IMAGE go build -a -tags ' osusergo netgo static_build' -ldflags ' -extldflags "-static"' -o dist/kool-linux-x86_64
13
19
14
20
echo " Building to GOOS=linux GOARCH=arm GOARM=6"
15
21
16
- docker run --rm --env GOOS=linux --env GOARCH=arm --env GOARM=6 --env CGO_ENABLED=0 -v $( pwd) :/code -w /code golang:1.14 go build -a -tags ' osusergo netgo static_build' -ldflags ' -extldflags "-static"' -o dist/kool-linux-arm6
22
+ docker run --rm --env GOOS=linux --env GOARCH=arm --env GOARM=6 --env CGO_ENABLED=0 -v $( pwd) :/code -w /code $GO_IMAGE go build -a -tags ' osusergo netgo static_build' -ldflags ' -extldflags "-static"' -o dist/kool-linux-arm6
17
23
18
24
echo " Building to GOOS=linux GOARCH=arm GOARM=7"
19
25
20
- docker run --rm --env GOOS=linux --env GOARCH=arm --env GOARM=7 --env CGO_ENABLED=0 -v $( pwd) :/code -w /code golang:1.14 go build -a -tags ' osusergo netgo static_build' -ldflags ' -extldflags "-static"' -o dist/kool-linux-arm7
26
+ docker run --rm --env GOOS=linux --env GOARCH=arm --env GOARM=7 --env CGO_ENABLED=0 -v $( pwd) :/code -w /code $GO_IMAGE go build -a -tags ' osusergo netgo static_build' -ldflags ' -extldflags "-static"' -o dist/kool-linux-arm7
21
27
22
28
echo " Going to generate CHECKSUMS"
23
29
Original file line number Diff line number Diff line change
1
+ scripts :
2
+ # Helper for local development - parsing presets onto Go,
3
+ # compiling and installig locally
4
+ dev :
5
+ - kool run parse-presets
6
+ - kool run compile
7
+ - kool run install
8
+ # Parsing the preset files onto Go code in a shell automated fashion.
9
+ parse-presets :
10
+ - bash parse_presets.sh
11
+ # Compiling kool itself. In case you are on MacOS make sure to have your .env
12
+ # file properly setting GOOS=darwin so you will be able to use the binary.
13
+ compile :
14
+ - kool docker golang:1.15.0 go build -o kool
15
+ install :
16
+ - mv kool /usr/local/bin/kools
You can’t perform that action at this time.
0 commit comments