Skip to content

Commit a736ba9

Browse files
committed
Switching to 1.0.3-SNAPSHOT, #17
1 parent 7487118 commit a736ba9

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

Diff for: Makefile

+21-16
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,42 @@ SOURCES := $(shell find $(SOURCEDIR) -name '*.go')
44
BINARY=sol
55
PWD := $(shell pwd)
66

7-
VERSION=1.0.2-SNAPSHOT
7+
VERSION=1.0.3-SNAPSHOT
88
PACKAGE=SleepOnLAN-${VERSION}
99
BUILD_TIME=$(date "%FT%T%z")
1010

1111
LDFLAGS=-ldflags "-d -s -w -X tensin.org/sol/core/version.Build=`git rev-parse HEAD`" -a -tags netgo -installsuffix netgo
12+
ifeq ($(shell hostname),jupiter)
13+
DOCKER_IMAGE="tensin-app-golang"
14+
else
15+
DOCKER_IMAGE="library/golang"
16+
endif
1217

1318
.PHONY: install clean deploy run
1419

1520
build:
16-
cd /go/src/
17-
go install main/go/sol/
21+
cd /go/src/
22+
go install main/go/sol/
1823

1924
clean:
20-
rm -rf bin
25+
rm -rf bin
2126

2227
run:
23-
bin/sol
28+
bin/sol
2429

2530
distribution: install
26-
mkdir /go/bin/linux/
27-
mv /go/bin/sol /go/bin/linux
28-
cp /go/src/main/resources/sol.json /go/bin/linux/
29-
cp /go/src/main/resources/sol.json /go/bin/windows_amd64/
30-
cp /go/src/script/*.bat /go/bin/windows_amd64
31-
cd /go/bin/ ; zip -r -9 ${PACKAGE}.zip ./linux ; zip -r -9 ${PACKAGE}.zip ./windows_amd64
31+
mkdir /go/bin/linux/
32+
mv /go/bin/sol /go/bin/linux
33+
cp /go/src/main/resources/sol.json /go/bin/linux/
34+
cp /go/src/main/resources/sol.json /go/bin/windows_amd64/
35+
cp /go/src/script/*.bat /go/bin/windows_amd64
36+
cd /go/bin/ ; zip -r -9 ${PACKAGE}.zip ./linux ; zip -r -9 ${PACKAGE}.zip ./windows_amd64
3237

3338
install: clean
34-
rm -rf /go/bin
35-
cd /go/src
36-
GOARCH=amd64 GOOS=windows go install main/go/sol/
37-
GOARCH=amd64 GOOS=linux go install -ldflags "-d -s -w -X tensin.org/watchthatpage/core.Build=`git rev-parse HEAD`" -a -tags netgo -installsuffix netgo main/go/sol/
39+
rm -rf /go/bin
40+
cd /go/src
41+
GOARCH=amd64 GOOS=windows go install main/go/sol/
42+
GOARCH=amd64 GOOS=linux go install -ldflags "-d -s -w -X tensin.org/watchthatpage/core.Build=`git rev-parse HEAD`" -a -tags netgo -installsuffix netgo main/go/sol/
3843

3944
docker:
40-
docker run --rm -it -v ${PWD}:/go tensin-app-golang /bin/bash
45+
docker run --rm -it -v ${PWD}:/go ${DOCKER_IMAGE} /bin/bash

0 commit comments

Comments
 (0)