mirror of
https://github.com/strongdm/comply
synced 2025-12-14 18:24:05 +00:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53dfead0b0 | ||
|
|
b569cb13d9 | ||
|
|
81ece97296 | ||
|
|
f732f7bb69 | ||
|
|
7a15435a49 | ||
|
|
5076283af5 | ||
|
|
2a19c67031 | ||
|
|
42922cb567 | ||
|
|
bb1a7f3f0f | ||
|
|
a383b24a66 | ||
|
|
2d0b13fb63 | ||
|
|
0986a313bc |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
comply
|
||||
output
|
||||
dist
|
||||
|
||||
14
Makefile
14
Makefile
@@ -3,22 +3,28 @@ 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
|
||||
@go get github.com/jteeuwen/go-bindata/...
|
||||
@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)
|
||||
go build github.com/strongdm/comply/cmd/comply
|
||||
@# $(eval VERSION := $(shell git describe --tags --always --dirty="-dev"))
|
||||
@# $(eval LDFLAGS := -ldflags='-X "github.com/strongdm/comply/internal/cli.Version=$(VERSION)"')
|
||||
go build $(LDFLAGS) 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
|
||||
echo $(VERSION)
|
||||
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
|
||||
brew: clean assets $(GO_SOURCES)
|
||||
$(eval VERSION := $(shell cat version))
|
||||
$(eval LDFLAGS := -ldflags='-X "cli.Version=$(VERSION)"')
|
||||
mkdir bin
|
||||
|
||||
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
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
)
|
||||
|
||||
// Version is set by the build system.
|
||||
const Version = "0.0.0-development"
|
||||
var Version = ""
|
||||
|
||||
// Main should be invoked by the main function in the main package.
|
||||
func Main() {
|
||||
@@ -32,7 +32,9 @@ func Main() {
|
||||
func newApp() *cli.App {
|
||||
app := cli.NewApp()
|
||||
app.Name = "comply"
|
||||
app.HideVersion = true
|
||||
if Version == "" {
|
||||
app.HideVersion = true
|
||||
}
|
||||
app.Version = Version
|
||||
app.Usage = "policy compliance toolkit"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user