cadoles-profile/Makefile
William Petit eba02717cf Modification du mot de passe fonctionnel
- Ajout de jeton anti CSRF dans les formulaires de login/profile
2019-05-22 14:24:53 +02:00

52 lines
1.2 KiB
Makefile

export PATH := $(PATH):/usr/local/go/bin
watch:
modd
deps: vendor
GO111MODULE=off go get -u golang.org/x/tools/cmd/godoc
GO111MODULE=off go get -u github.com/cortesi/modd/cmd/modd
GO111MODULE=off go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
build: vendor bin/server
release: vendor
script/release
test:
GO111MODULE=off go clean -testcache
go test -race -v -mod=vendor -cover -tags=test $(TEST_ARGS) ./...
tidy:
go mod tidy
vendor: tidy
go mod vendor
bin/server: generate
CGO_ENABLED=0 go build -mod=vendor -v -o bin/server ./cmd/server
lint:
GO111MODULE=off golangci-lint run --enable-all --disable gochecknoglobals
clean:
rm -rf ./bin ./release ./vendor ./data
godoc:
@echo "open your browser to http://localhost:6060/pkg/forge.cadoles.com/Cadoles/ldap-profile to see the documentation"
godoc -http=:6060
fake-ldap:
docker kill cadoles-profile-ldap || exit 0
mkdir -p data/ldap/o=test
[ -e data/ldap/o=test/uid=jdoe ] || cp misc/ldap/jdoe.json data/ldap/o=test/uid=jdoe
docker run \
--rm -it \
-p 389:3389 \
-p 8081:8081 \
-v $(PWD)/data/ldap:/fake-ldap/data/ldap \
--name cadoles-profile-ldap \
bornholm/fake-ldap
.PHONY: test run clean generate vendor deps lint tidy release