Skip to content

Commit 36bed60

Browse files
committed
Add a release target to the Makefile
Split out the makefile from the implementation of the targets via scripts.
1 parent 7dc8cb2 commit 36bed60

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ vet:
22
go vet
33

44
test: vet
5-
ginkgo -p -r --randomizeAllSpecs --failOnPending --randomizeSuites --race
5+
./scripts/test.sh
66

77
coverage: vet
8-
ginkgo -p -r --randomizeAllSpecs --failOnPending --randomizeSuites --race -cover -coverprofile=coverage.txt -outputdir=.
8+
./scripts/generate-coverage.sh
9+
10+
release: test
11+
./scripts/release.sh
912

1013
.PHONY: test

scripts/generate-coverage.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
ginkgo -p -r --randomizeAllSpecs --failOnPending --randomizeSuites --race -cover -coverprofile=coverage.txt -outputdir=.
4+

scripts/release.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
workspace=$(mktemp -d)
4+
5+
for platform in linux darwin; do
6+
echo "building ${platform}..."
7+
env GOOS=${platform} GOARCH=amd64 CGO_ENABLED=0 \
8+
go build -o ${workspace}/gomg_${platform} github.com/williammartin/gomg
9+
done
10+
11+
open ${workspace}

scripts/test.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
ginkgo -p -r --randomizeAllSpecs --failOnPending --randomizeSuites --race
4+

0 commit comments

Comments
 (0)