@ -23,13 +23,13 @@ getGoDependencies:
buildProject :
buildProject :
rm -rf releases
rm -rf releases
mkdir releases
mkdir releases
gox -output= "releases/{{.Dir}}_{{.OS}}_{{.Arch}}/{{.Dir}}" -osarch= "linux/amd64 linux/arm windows/amd64 windows/386" -ldflags= "-X github.com/mxschmitt/golang-url-shortener/util.ldFlagNodeJS=`node --version` -X github.com/mxschmitt/golang-url-shortener/util.ldFlagCommit=`git rev-parse HEAD` -X github.com/mxschmitt/golang-url-shortener/util.ldFlagYarn=`yarn --version` -X github.com/mxschmitt/golang-url-shortener/util.ldFlagCompilationTime=`date --iso-8601=seconds `"
gox -output= "releases/{{.Dir}}_{{.OS}}_{{.Arch}}/{{.Dir}}" -osarch= "linux/amd64 linux/arm windows/amd64 windows/386" -ldflags= "-X github.com/mxschmitt/golang-url-shortener/util.ldFlagNodeJS=`node --version` -X github.com/mxschmitt/golang-url-shortener/util.ldFlagCommit=`git rev-parse HEAD` -X github.com/mxschmitt/golang-url-shortener/util.ldFlagYarn=`yarn --version` -X github.com/mxschmitt/golang-url-shortener/util.ldFlagCompilationTime=`TZ=UTC date +%Y-%m-%dT%H:%M:%S+0000 `"
find releases -maxdepth 1 -mindepth 1 -type d -exec cp build/config.yaml { } \;
find releases -maxdepth 1 -mindepth 1 -type d -exec cp build/config.yaml { } \;
find releases -maxdepth 1 -mindepth 1 -type d -exec tar -cvjf { } .tar.bz2 { } \;
find releases -maxdepth 1 -mindepth 1 -type d -exec tar -cvjf { } .tar.bz2 { } \;
buildDockerImage :
buildDockerImage :
rm -rf docker_releases
rm -rf docker_releases
mkdir docker_releases
mkdir docker_releases
CGO_ENABLED = 0 gox -output= "docker_releases/{{.Dir}}_{{.OS}}_{{.Arch}}/{{.Dir}}" -osarch= "linux/amd64 linux/arm" -ldflags= "-X github.com/mxschmitt/golang-url-shortener/util.ldFlagNodeJS=`node --version` -X github.com/mxschmitt/golang-url-shortener/util.ldFlagCommit=`git rev-parse HEAD` -X github.com/mxschmitt/golang-url-shortener/util.ldFlagYarn=`yarn --version` -X github.com/mxschmitt/golang-url-shortener/util.ldFlagCompilationTime=`date --iso-8601=seconds `"
CGO_ENABLED = 0 gox -output= "docker_releases/{{.Dir}}_{{.OS}}_{{.Arch}}/{{.Dir}}" -osarch= "linux/amd64 linux/arm" -ldflags= "-X github.com/mxschmitt/golang-url-shortener/util.ldFlagNodeJS=`node --version` -X github.com/mxschmitt/golang-url-shortener/util.ldFlagCommit=`git rev-parse HEAD` -X github.com/mxschmitt/golang-url-shortener/util.ldFlagYarn=`yarn --version` -X github.com/mxschmitt/golang-url-shortener/util.ldFlagCompilationTime=`TZ=UTC date +%Y-%m-%dT%H:%M:%S+0000 `"
docker build -t mxschmitt/golang_url_shortener:arm -f Dockerfile.arm .
docker build -t mxschmitt/golang_url_shortener:arm -f Dockerfile.arm .
docker build -t mxschmitt/golang_url_shortener -f Dockerfile.amd64 .
docker build -t mxschmitt/golang_url_shortener -f Dockerfile.amd64 .