Skip to content

Commit

Permalink
Switching to 1.0.3-SNAPSHOT, #17
Browse files Browse the repository at this point in the history
  • Loading branch information
SR-G committed Dec 20, 2017
1 parent 7487118 commit a736ba9
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,42 @@ SOURCES := $(shell find $(SOURCEDIR) -name '*.go')
BINARY=sol
PWD := $(shell pwd)

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

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

.PHONY: install clean deploy run

build:
cd /go/src/
go install main/go/sol/
cd /go/src/
go install main/go/sol/

clean:
rm -rf bin
rm -rf bin

run:
bin/sol
bin/sol

distribution: install
mkdir /go/bin/linux/
mv /go/bin/sol /go/bin/linux
cp /go/src/main/resources/sol.json /go/bin/linux/
cp /go/src/main/resources/sol.json /go/bin/windows_amd64/
cp /go/src/script/*.bat /go/bin/windows_amd64
cd /go/bin/ ; zip -r -9 ${PACKAGE}.zip ./linux ; zip -r -9 ${PACKAGE}.zip ./windows_amd64
mkdir /go/bin/linux/
mv /go/bin/sol /go/bin/linux
cp /go/src/main/resources/sol.json /go/bin/linux/
cp /go/src/main/resources/sol.json /go/bin/windows_amd64/
cp /go/src/script/*.bat /go/bin/windows_amd64
cd /go/bin/ ; zip -r -9 ${PACKAGE}.zip ./linux ; zip -r -9 ${PACKAGE}.zip ./windows_amd64

install: clean
rm -rf /go/bin
cd /go/src
GOARCH=amd64 GOOS=windows go install main/go/sol/
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/
rm -rf /go/bin
cd /go/src
GOARCH=amd64 GOOS=windows go install main/go/sol/
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/

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

0 comments on commit a736ba9

Please sign in to comment.