Mercurial > gemma
changeset 4464:707450608829
Get rid of (ugly) 3rdpartylibs.sh script. Use go modules.
This works best with go >= 1.13.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Mon, 23 Sep 2019 15:15:48 +0200 |
parents | 1cdd246860ae |
children | 0ad75dd3d77c |
files | 3rdpartylibs.sh Makefile |
diffstat | 2 files changed, 5 insertions(+), 89 deletions(-) [+] |
line wrap: on
line diff
--- a/3rdpartylibs.sh Mon Sep 23 14:24:27 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -#!/bin/sh - -# pgx hase undergone some major incompatible changes in v4, -# we need to stick to v3 for now... -# Unfortunatly using gopkg.in does not work as expected here, so lets -# get hackisch... -go get -u -v gopkg.in/jackc/pgx.v3 -oldcwd="$CWD" -cd "$GOPATH"/src/github.com/jackc/pgx -git checkout v3.6.0 -cd "$oldcwd" -# MIT - -go get -u -v github.com/etcd-io/bbolt/... -# MIT - -go get -u -v github.com/mitchellh/go-homedir -# MIT - -go get -u -v github.com/spf13/cobra -# Apache-2.0 - -go get -u -v github.com/spf13/viper -# MIT - -go get -u -v github.com/gorilla/mux -# BSD-3-Clause - -go get -u -v gopkg.in/gomail.v2 -# MIT - -go get -u -v github.com/rs/cors -# MIT - -go get -u -v golang.org/x/net/html/charset -# Go License (aka BSD-3-Clause?) - -go get -u -v github.com/golang/snappy -# BSD-3-Clause - -go get -u -v github.com/jonas-p/go-shp -# MIT - -go get -u -v gopkg.in/robfig/cron.v1 -# MIT - -go get -u -v github.com/tidwall/rtree -# MIT - -go get -u -v golang.org/x/sync/semaphore -# Go License (aka BSD-3-Clause?) - -go get -u -v gonum.org/v1/gonum/stat -# BSD-3-Clause - -go get -u -v github.com/sergi/go-diff/diffmatchpatch -# MIT -# Only used in tests. - -# Only needed when generating SVG graphics for debugging. -# go get -u -v github.com/ajstarks/svgo -# Attribution 3.0 United States (CC BY 3.0 US) - -## list of additional licenses that get fetched and installed as dependencies -# github.com/fsnotify/fsnotify/ BSD-3-Clause -# github.com/hashicorp/hcl/ MPL-2.0 -# github.com/magiconair/properties/ BSD-2-Clause -# github.com/mitchellh/go-homedir/ MIT -# github.com/mitchellh/mapstructure MIT -# github.com/pelletier/go-toml/ MIT -# github.com/pkg/errors BSD-2-Clause -# github.com/spf13/afero/ Apache 2.0 -# github.com/spf13/cast MIT -# github.com/spf13/jwalterweatherman MIT -# gopkg.in/yaml.v2/#
--- a/Makefile Mon Sep 23 14:24:27 2019 +0200 +++ b/Makefile Mon Sep 23 15:15:48 2019 +0200 @@ -12,18 +12,14 @@ export BUILDBASE -3rdpartylibs-stamp := $(BUILDBASE)/3rdpartylibs-build - -.PHONY: all 3rdpartylibs gemma client clean +.PHONY: all gemma client clean all: gemma client $(ENVWARPPER): @echo "Preparing go build environment:" + mkdir -p "$(GOPATH)" mkdir -p "$(GOCACHE)" - mkdir -p "$(GOPATH)/src/gemma.intevation.de" - [ -e "$(GOPATH)/src/gemma.intevation.de/gemma" ] || \ - ln -s "$(basedir)" "$(GOPATH)/src/gemma.intevation.de/gemma" @echo "Creating wrapper script:" echo '#!/bin/sh' >"$(ENVWARPPER)" echo 'export GOPATH=$(GOPATH)' >>"$(ENVWARPPER)" @@ -31,14 +27,8 @@ echo 'exec "$$@"' >>"$(ENVWARPPER)" chmod +x "$(ENVWARPPER)" -$(3rdpartylibs-stamp): $(ENVWARPPER) 3rdpartylibs.sh - "$(ENVWARPPER)" bash ./3rdpartylibs.sh && \ - touch $@ - -3rdpartylibs: $(3rdpartylibs-stamp) - -gemma: $(3rdpartylibs-stamp) $(ENVWARPPER) - cd cmd/gemma && "$(ENVWARPPER)" go build +gemma: $(ENVWARPPER) + "$(ENVWARPPER)" go build -o ./cmd/gemma/gemma ./cmd/gemma client: $(MAKE) -f Makefile.build -C client @@ -55,4 +45,5 @@ clean: $(MAKE) -f Makefile.build -C client $@ rm -f "$(gemma-bin)" + chmod -R u+w "$(BUILDBASE)" # This is neccessary for deletion to work... rm -rf "$(BUILDBASE)"