From 73bc416afd0e6358a1b2fd5659469e9d230d4d28 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Sun, 9 Oct 2016 14:17:33 -0400 Subject: [PATCH] adding gitlab web --- .gitlab-ci.yml | 29 +++++++++++++++++++++++++++++ web/Makefile | 12 +++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f642830 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,29 @@ +stages: + - build-stuff + +pages: + stage: build-stuff + script: + - export CURRENT_BUILD_PATH=$(pwd) + - echo $PATH + - rm -rf $HOME/golang + - rm -rf $HOME/gopath + - mkdir -p $HOME/golang # for GOROOT (contains the Go binary & core packages) + - mkdir -p $HOME/gopath # for GOPATH (contains code and external packages) + - curl http://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz 2>/dev/null > go1.7.1.linux-amd64.tar.gz + - tar -C $HOME/golang -xzf go1.7.1.linux-amd64.tar.gz + - export GOROOT=$HOME/golang/go + - export GOPATH=$HOME/gopath + - export PATH=$PATH:$GOROOT/bin + - export PATH=$PATH:$GOPATH/bin + - (if [[ "$(go version)" == *"go version go1.7"* ]]; then echo "✓ Go binary installed!"; else echo "Go binary not installed"; exit -1; fi); + - go version + - echo $PATH + - go env + - which go + - cd $CURRENT_BUILD_PATH + - make + - mv web public + artifacts: + paths: + - public diff --git a/web/Makefile b/web/Makefile index 7df3149..1a4dff8 100644 --- a/web/Makefile +++ b/web/Makefile @@ -1,4 +1,14 @@ -all: togoist.go web.go +all: togoist + +.PHONY: dependencies + +dependencies: + go get -u github.com/gopherjs/gopherjs + go get -u github.com/bep/debounce + go get -u github.com/gopherjs/jquery + go get -u gitlab.com/chrissexton/togoist + +togoist: togoist.go web.go dependencies @go generate clean: