Do some build / test-integration fixes
- target generate-webui depends on build-webui - generate-webui will run only if the folder static does not exists - create compose project before starting it >_<'', otherwise it does nothing :'D Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
e9c23195a0
commit
e3b519cdd8
2 changed files with 15 additions and 9 deletions
18
Makefile
18
Makefile
|
@ -24,13 +24,13 @@ print-%: ; @echo $*=$($*)
|
||||||
|
|
||||||
default: binary
|
default: binary
|
||||||
|
|
||||||
all: build-webui build
|
all: generate-webui build
|
||||||
$(DOCKER_RUN_TRAEFIK) ./script/make.sh
|
$(DOCKER_RUN_TRAEFIK) ./script/make.sh
|
||||||
|
|
||||||
binary: build-webui generate-webui build
|
binary: generate-webui build
|
||||||
$(DOCKER_RUN_TRAEFIK) ./script/make.sh generate binary
|
$(DOCKER_RUN_TRAEFIK) ./script/make.sh generate binary
|
||||||
|
|
||||||
crossbinary: build-webui generate-webui build
|
crossbinary: generate-webui build
|
||||||
$(DOCKER_RUN_TRAEFIK) ./script/make.sh generate crossbinary
|
$(DOCKER_RUN_TRAEFIK) ./script/make.sh generate crossbinary
|
||||||
|
|
||||||
test: build
|
test: build
|
||||||
|
@ -77,13 +77,15 @@ run-dev:
|
||||||
go build
|
go build
|
||||||
./traefik
|
./traefik
|
||||||
|
|
||||||
generate-webui:
|
generate-webui: build-webui
|
||||||
mkdir -p static
|
if [ ! -d "static" ]; then \
|
||||||
docker run --rm -v "$$PWD/static":'/src/static' traefik-webui gulp
|
mkdir -p static; \
|
||||||
echo 'For more informations show `webui/readme.md`' > $$PWD/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md
|
docker run --rm -v "$$PWD/static":'/src/static' traefik-webui gulp; \
|
||||||
|
echo 'For more informations show `webui/readme.md`' > $$PWD/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md; \
|
||||||
|
fi
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(foreach file,$(SRCS),golint $(file) || exit;)
|
$(foreach file,$(SRCS),golint $(file) || exit;)
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
gofmt -s -l -w $(SRCS)
|
gofmt -s -l -w $(SRCS)
|
||||||
|
|
|
@ -87,6 +87,9 @@ func (s *BaseSuite) createComposeProject(c *check.C, name string) {
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
s.composeProject = composeProject
|
s.composeProject = composeProject
|
||||||
|
|
||||||
|
err = composeProject.Create()
|
||||||
|
c.Assert(err, checker.IsNil)
|
||||||
|
|
||||||
s.started = make(chan bool)
|
s.started = make(chan bool)
|
||||||
s.stopped = make(chan bool)
|
s.stopped = make(chan bool)
|
||||||
s.deleted = make(chan bool)
|
s.deleted = make(chan bool)
|
||||||
|
@ -96,7 +99,8 @@ func (s *BaseSuite) createComposeProject(c *check.C, name string) {
|
||||||
|
|
||||||
composeProject.AddListener(s.listenChan)
|
composeProject.AddListener(s.listenChan)
|
||||||
|
|
||||||
composeProject.Start()
|
err = composeProject.Start()
|
||||||
|
c.Assert(err, checker.IsNil)
|
||||||
|
|
||||||
// Wait for compose to start
|
// Wait for compose to start
|
||||||
<-s.started
|
<-s.started
|
||||||
|
|
Loading…
Reference in a new issue