Mercurial > gemma
annotate Makefile @ 5574:271888ef85bc surveysperbottleneckid
Finalize use of bottleneck id instead of name.
Main feaure is the restructuring of the /surveys endpoint.
The endpoint now takes queryparameters as qualifiers.
/surveys?id={id} returns surveys to a given bottleck {id}
/surveys?name={name} & date={date} returns surveys for given {name}
of a bottleneck and {date} for a surveydate.
This is needed mainly because there is some backwards incompatibility
when reviewing sounding results where the summary of a sr import
contains only the name instead of the id of the according bottleneck.
To bridge this mismatch the survey endpoint could be queried for the
sr to review given the surveydate and the name of the bottleneck.
Premise is here, that a date and a bottleneck's name is specific enough
to identify the correct survey with the correct bottleneck.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 21 Jul 2021 14:33:35 +0200 |
parents | 983d6efc04e9 |
children | 02c2d0edeb2a |
rev | line source |
---|---|
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
1 # Simple Makefile to build all of Gemma |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
2 # |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
3 # Authors: Sascha Wilde <wilde@intevation.de> |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
4 |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
5 basedir := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
6 |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
7 BUILDBASE := $(basedir).buildbase |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
8 GOPATH := $(BUILDBASE)/go |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
9 GOCACHE := $(BUILDBASE)/gocache |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
10 ENVWARPPER := $(BUILDBASE)/run-with-env.sh |
402
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
303
diff
changeset
|
11 BINDIR := /usr/local/bin |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
12 |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
13 export BUILDBASE |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
14 |
4464
707450608829
Get rid of (ugly) 3rdpartylibs.sh script. Use go modules.
Sascha Wilde <wilde@intevation.de>
parents:
4397
diff
changeset
|
15 .PHONY: all gemma client clean |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
16 |
4824
c0eb491aaaa7
Removed octree from octree package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4664
diff
changeset
|
17 all: gemma client |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
18 |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
19 $(ENVWARPPER): |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
20 @echo "Preparing go build environment:" |
4464
707450608829
Get rid of (ugly) 3rdpartylibs.sh script. Use go modules.
Sascha Wilde <wilde@intevation.de>
parents:
4397
diff
changeset
|
21 mkdir -p "$(GOPATH)" |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
22 mkdir -p "$(GOCACHE)" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
23 @echo "Creating wrapper script:" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
24 echo '#!/bin/sh' >"$(ENVWARPPER)" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
25 echo 'export GOPATH=$(GOPATH)' >>"$(ENVWARPPER)" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
26 echo 'export GOCACHE=$(GOCACHE)' >>"$(ENVWARPPER)" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
27 echo 'exec "$$@"' >>"$(ENVWARPPER)" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
28 chmod +x "$(ENVWARPPER)" |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
29 |
4464
707450608829
Get rid of (ugly) 3rdpartylibs.sh script. Use go modules.
Sascha Wilde <wilde@intevation.de>
parents:
4397
diff
changeset
|
30 gemma: $(ENVWARPPER) |
707450608829
Get rid of (ugly) 3rdpartylibs.sh script. Use go modules.
Sascha Wilde <wilde@intevation.de>
parents:
4397
diff
changeset
|
31 "$(ENVWARPPER)" go build -o ./cmd/gemma/gemma ./cmd/gemma |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
32 |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
33 client: |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
34 $(MAKE) -f Makefile.build -C client |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
35 |
402
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
303
diff
changeset
|
36 install: gemma |
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
303
diff
changeset
|
37 cp cmd/gemma/gemma $(BINDIR) |
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
303
diff
changeset
|
38 |
537
942a865986f6
Added simple build target for deployment tar.
Sascha Wilde <wilde@intevation.de>
parents:
402
diff
changeset
|
39 tar: all |
942a865986f6
Added simple build target for deployment tar.
Sascha Wilde <wilde@intevation.de>
parents:
402
diff
changeset
|
40 v="gemma-$$(hg id -i)" ;\ |
942a865986f6
Added simple build target for deployment tar.
Sascha Wilde <wilde@intevation.de>
parents:
402
diff
changeset
|
41 tar --transform "s@^@$${v}/@" \ |
942a865986f6
Added simple build target for deployment tar.
Sascha Wilde <wilde@intevation.de>
parents:
402
diff
changeset
|
42 -cJf "../$${v}.tar.xz" \ |
5400
983d6efc04e9
Added report-templates to release tar.
wilde@azure1.rgb.intevation.de
parents:
4838
diff
changeset
|
43 cmd/gemma/gemma schema style-templates report-templates \ |
4664
7d2463c7b4ad
Added cmd/oct2str/oct2str to Makefile.
Sascha Wilde <wilde@intevation.de>
parents:
4494
diff
changeset
|
44 web misc example_conf.toml |
537
942a865986f6
Added simple build target for deployment tar.
Sascha Wilde <wilde@intevation.de>
parents:
402
diff
changeset
|
45 |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
46 clean: |
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
47 $(MAKE) -f Makefile.build -C client $@ |
214
da24df80c25d
Fix Makefile clean target: don't fail if no back end bin to delete.
Sascha Wilde <wilde@intevation.de>
parents:
206
diff
changeset
|
48 rm -f "$(gemma-bin)" |
4464
707450608829
Get rid of (ugly) 3rdpartylibs.sh script. Use go modules.
Sascha Wilde <wilde@intevation.de>
parents:
4397
diff
changeset
|
49 chmod -R u+w "$(BUILDBASE)" # This is neccessary for deletion to work... |
191
01c5794608e0
Added simple makefiles to build back end and client.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
50 rm -rf "$(BUILDBASE)" |