mirror of
https://github.com/strongdm/comply
synced 2025-12-15 19:00:50 +00:00
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42922cb567 | ||
|
|
bb1a7f3f0f | ||
|
|
a383b24a66 | ||
|
|
2d0b13fb63 | ||
|
|
0986a313bc | ||
|
|
18c017009d | ||
|
|
ac11f4ac9d | ||
|
|
911b84dedc | ||
|
|
d212e627fd | ||
|
|
29edb6c90a | ||
|
|
62d05e3358 | ||
|
|
e08d88ee49 | ||
|
|
80bdc44f14 | ||
|
|
41dbf7ca19 | ||
|
|
182aa3d9ed | ||
|
|
57ea96e4c9 | ||
|
|
5a58efd983 | ||
|
|
68a67cb50b | ||
|
|
06afa72dee | ||
|
|
fc9c908a42 | ||
|
|
ec29b57842 | ||
|
|
9fb5b3e04f | ||
|
|
2eac1512cb | ||
|
|
90a507963c | ||
|
|
2a316ccdab | ||
|
|
d1fdd377ad | ||
|
|
7814e52b6b | ||
|
|
939349df4a | ||
|
|
1c903416d4 | ||
|
|
af48939756 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
comply
|
comply
|
||||||
output
|
output
|
||||||
|
dist
|
||||||
|
|||||||
73
Makefile
73
Makefile
@@ -3,12 +3,35 @@ GO_SOURCES := $(shell find . -name '*.go')
|
|||||||
THEME_SOURCES := $(shell find themes)
|
THEME_SOURCES := $(shell find themes)
|
||||||
|
|
||||||
assets: $(THEME_SOURCES)
|
assets: $(THEME_SOURCES)
|
||||||
go-bindata-assetfs -pkg theme -prefix themes themes/...
|
go get github.com/jteeuwen/go-bindata/...
|
||||||
mv bindata_assetfs.go internal/theme/themes_bindata.go
|
go get github.com/elazarl/go-bindata-assetfs/...
|
||||||
|
go install github.com/elazarl/go-bindata-assetfs
|
||||||
|
go-bindata-assetfs -o bindata.go -pkg theme -prefix themes themes/...
|
||||||
|
mv bindata.go internal/theme/themes_bindata.go
|
||||||
|
|
||||||
comply: assets $(GO_SOURCES)
|
comply: assets $(GO_SOURCES)
|
||||||
go build github.com/strongdm/comply/cmd/comply
|
go build github.com/strongdm/comply/cmd/comply
|
||||||
|
|
||||||
|
dist: clean
|
||||||
|
$(eval VERSION := $(shell git describe --tags --always --dirty="-dev"))
|
||||||
|
$(eval LDFLAGS := -ldflags='-X "cli.Version=$(VERSION)"')
|
||||||
|
mkdir dist
|
||||||
|
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
|
||||||
|
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
|
||||||
|
|
||||||
|
brew: clean assets $(GO_SOURCES)
|
||||||
|
$(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
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf bin
|
||||||
|
rm -rf dist
|
||||||
|
rm -f comply
|
||||||
|
|
||||||
install: assets $(GO_SOURCES)
|
install: assets $(GO_SOURCES)
|
||||||
go install github.com/strongdm/comply/cmd/comply
|
go install github.com/strongdm/comply/cmd/comply
|
||||||
|
|
||||||
@@ -33,3 +56,49 @@ cleanse:
|
|||||||
git push -f origin master
|
git push -f origin master
|
||||||
git gc --aggressive --prune=all
|
git gc --aggressive --prune=all
|
||||||
|
|
||||||
|
release: dist release-deps
|
||||||
|
$(eval VERSION := $(shell git describe --tags --always --dirty="-dev"))
|
||||||
|
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) \
|
||||||
|
--name comply-$(VERSION)-darwin-amd64.tgz \
|
||||||
|
--file dist/comply-$(VERSION)-darwin-amd64.tgz
|
||||||
|
|
||||||
|
github-release upload \
|
||||||
|
--security-token $$GH_LOGIN \
|
||||||
|
--user strongdm \
|
||||||
|
--repo comply \
|
||||||
|
--tag $(VERSION) \
|
||||||
|
--name comply-$(VERSION)-linux-amd64.tgz \
|
||||||
|
--file dist/comply-$(VERSION)-linux-amd64.tgz
|
||||||
|
|
||||||
|
patch-release: patch release
|
||||||
|
|
||||||
|
minor-release: minor release
|
||||||
|
|
||||||
|
patch: clean gitsem
|
||||||
|
gitsem -m "increment patch for release" patch
|
||||||
|
git push
|
||||||
|
git push origin --tags
|
||||||
|
|
||||||
|
minor: clean gitsem
|
||||||
|
gitsem -m "increment minor for release" minor
|
||||||
|
git push
|
||||||
|
git push origin --tags
|
||||||
|
|
||||||
|
release-deps: gitsem gh-release
|
||||||
|
|
||||||
|
gitsem:
|
||||||
|
go get -u github.com/Clever/gitsem
|
||||||
|
|
||||||
|
gh-release:
|
||||||
|
go get -u github.com/aktau/github-release
|
||||||
22
comply.rb
Normal file
22
comply.rb
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
class Comply < Formula
|
||||||
|
desc ""
|
||||||
|
homepage ""
|
||||||
|
url "file:///Users/jmccarthy/Downloads/comply-1.1.3.tgz"
|
||||||
|
sha256 "01f9920e5e9fbd29386e4a4131fac78c002730e49c3f870a0ee2b958c3ce75f6"
|
||||||
|
|
||||||
|
depends_on "go" => :build
|
||||||
|
|
||||||
|
def install
|
||||||
|
ENV["GOPATH"] = buildpath
|
||||||
|
ENV.prepend_create_path "PATH", buildpath/"bin"
|
||||||
|
(buildpath/"src/github.com/strongdm/comply").install buildpath.children
|
||||||
|
cd "src/github.com/strongdm/comply" do
|
||||||
|
system "make", "brew"
|
||||||
|
bin.install "bin/comply"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
test do
|
||||||
|
system "#{bin}/sdm", "logout"
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -32,7 +32,9 @@ func Main() {
|
|||||||
func newApp() *cli.App {
|
func newApp() *cli.App {
|
||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
app.Name = "comply"
|
app.Name = "comply"
|
||||||
app.HideVersion = true
|
if Version == "" {
|
||||||
|
app.HideVersion = true
|
||||||
|
}
|
||||||
app.Version = Version
|
app.Version = Version
|
||||||
app.Usage = "policy compliance toolkit"
|
app.Usage = "policy compliance toolkit"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user