2018-05-10 01:02:33 +00:00
|
|
|
.DEFAULT_GOAL := comply
|
|
|
|
GO_SOURCES := $(shell find . -name '*.go')
|
|
|
|
THEME_SOURCES := $(shell find themes)
|
|
|
|
|
|
|
|
assets: $(THEME_SOURCES)
|
|
|
|
go-bindata-assetfs -pkg theme -prefix themes themes/...
|
|
|
|
mv bindata_assetfs.go internal/theme/themes_bindata.go
|
|
|
|
|
|
|
|
comply: assets $(GO_SOURCES)
|
|
|
|
go build github.com/strongdm/comply/cmd/comply
|
|
|
|
|
2018-05-10 06:53:17 +00:00
|
|
|
dist: clean
|
2018-05-10 07:31:58 +00:00
|
|
|
$(eval VERSION := $(shell git describe --tags --always --dirty="-dev"))
|
|
|
|
$(eval LDFLAGS := -ldflags='-X "cli.Version=$(VERSION)"')
|
2018-05-10 06:53:17 +00:00
|
|
|
mkdir dist
|
2018-05-10 23:43:02 +00:00
|
|
|
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -gcflags=-trimpath=$(GOPATH) -asmflags=-trimpath=$(GOPATH) $(LDFLAGS) -o dist/comply-$(VERSION)-darwin-amd64 ./cmd/comply
|
|
|
|
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -gcflags=-trimpath=$(GOPATH) -asmflags=-trimpath=$(GOPATH) $(LDFLAGS) -o dist/comply-$(VERSION)-linux-amd64 ./cmd/comply
|
2018-05-10 07:12:00 +00:00
|
|
|
cd dist && tar -czvf comply-$(VERSION)-darwin-amd64.tgz comply-$(VERSION)-darwin-amd64
|
|
|
|
cd dist && tar -czvf comply-$(VERSION)-linux-amd64.tgz comply-$(VERSION)-linux-amd64
|
2018-05-10 23:43:02 +00:00
|
|
|
|
|
|
|
brew: clean
|
|
|
|
$(eval VERSION := $(shell cat version))
|
|
|
|
$(eval LDFLAGS := -ldflags='-X "cli.Version=$(VERSION)"')
|
|
|
|
mkdir bin
|
|
|
|
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -gcflags=-trimpath=$(GOPATH) -asmflags=-trimpath=$(GOPATH) $(LDFLAGS) -o bin/comply ./cmd/comply
|
|
|
|
|
2018-05-10 06:53:17 +00:00
|
|
|
clean:
|
2018-05-10 23:43:02 +00:00
|
|
|
rm -rf bin
|
2018-05-10 06:53:17 +00:00
|
|
|
rm -rf dist
|
|
|
|
rm -f comply
|
|
|
|
|
2018-05-10 01:02:33 +00:00
|
|
|
install: assets $(GO_SOURCES)
|
|
|
|
go install github.com/strongdm/comply/cmd/comply
|
|
|
|
|
|
|
|
export-example:
|
|
|
|
cp example/narratives/* themes/comply-soc2/narratives
|
|
|
|
cp example/procedures/* themes/comply-soc2/procedures
|
|
|
|
cp example/policies/* themes/comply-soc2/policies
|
|
|
|
cp example/standards/* themes/comply-soc2/standards
|
|
|
|
cp example/templates/* themes/comply-soc2/templates
|
|
|
|
|
|
|
|
docker:
|
|
|
|
cd build && docker build -t strongdm/pandoc .
|
|
|
|
docker tag jagregory/pandoc:latest strongdm/pandoc:latest
|
|
|
|
docker push strongdm/pandoc
|
|
|
|
|
|
|
|
cleanse:
|
|
|
|
git checkout --orphan newbranch
|
|
|
|
git add -A
|
|
|
|
git commit -m "Initial commit"
|
|
|
|
git branch -D master
|
|
|
|
git branch -m master
|
|
|
|
git push -f origin master
|
|
|
|
git gc --aggressive --prune=all
|
|
|
|
|
2018-05-10 07:17:00 +00:00
|
|
|
release: dist release-deps
|
2018-05-10 07:31:58 +00:00
|
|
|
$(eval VERSION := $(shell git describe --tags --always --dirty="-dev"))
|
2018-05-10 06:53:17 +00:00
|
|
|
github-release release \
|
|
|
|
--security-token $$GH_LOGIN \
|
|
|
|
--user strongdm \
|
|
|
|
--repo comply \
|
|
|
|
--tag $(VERSION) \
|
|
|
|
--name $(VERSION)
|
|
|
|
|
|
|
|
github-release upload \
|
|
|
|
--security-token $$GH_LOGIN \
|
|
|
|
--user strongdm \
|
|
|
|
--repo comply \
|
|
|
|
--tag $(VERSION) \
|
2018-05-10 07:12:00 +00:00
|
|
|
--name comply-$(VERSION)-darwin-amd64.tgz \
|
|
|
|
--file dist/comply-$(VERSION)-darwin-amd64.tgz
|
2018-05-10 06:53:17 +00:00
|
|
|
|
|
|
|
github-release upload \
|
|
|
|
--security-token $$GH_LOGIN \
|
|
|
|
--user strongdm \
|
|
|
|
--repo comply \
|
|
|
|
--tag $(VERSION) \
|
2018-05-10 07:12:00 +00:00
|
|
|
--name comply-$(VERSION)-linux-amd64.tgz \
|
|
|
|
--file dist/comply-$(VERSION)-linux-amd64.tgz
|
2018-05-10 06:53:17 +00:00
|
|
|
|
2018-05-10 07:17:00 +00:00
|
|
|
patch-release: patch release
|
|
|
|
|
2018-05-10 07:38:38 +00:00
|
|
|
minor-release: minor release
|
2018-05-10 07:38:19 +00:00
|
|
|
|
2018-05-10 07:17:46 +00:00
|
|
|
patch: clean gitsem
|
2018-05-10 07:34:39 +00:00
|
|
|
gitsem -m "increment patch for release" patch
|
2018-05-10 07:21:04 +00:00
|
|
|
git push
|
2018-05-10 07:20:04 +00:00
|
|
|
git push origin --tags
|
2018-05-10 07:17:00 +00:00
|
|
|
|
2018-05-10 07:38:19 +00:00
|
|
|
minor: clean gitsem
|
|
|
|
gitsem -m "increment minor for release" minor
|
|
|
|
git push
|
|
|
|
git push origin --tags
|
|
|
|
|
2018-05-10 07:17:00 +00:00
|
|
|
release-deps: gitsem gh-release
|
|
|
|
|
|
|
|
gitsem:
|
|
|
|
go get -u github.com/Clever/gitsem
|
|
|
|
|
2018-05-10 06:53:17 +00:00
|
|
|
gh-release:
|
|
|
|
go get -u github.com/aktau/github-release
|