From ba2f4a32d3d8d4224ae356b7cfe34c5016b09ee9 Mon Sep 17 00:00:00 2001 From: yoavrotems Date: Tue, 17 Dec 2019 00:47:39 +0000 Subject: [PATCH 1/4] Add files via upload --- .goreleaser.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..f8aa5f3 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,20 @@ +env: + - GO111MODULE=on +builds: + - main: main.go + binary: linux-bench + goos: + - linux + goarch: + - amd64 +# Archive customization +archive: + format: tar.gz +nfpm: + vendor: Aqua Security + description: "The Linux Bench for Security is a Go application that checks whether Linux host is deployed according to security best practices" + license: Apache-2.0 + homepage: https://github.com/aquasecurity/linux-bench + formats: + - deb + - rpm \ No newline at end of file From 4e5eb1107bcb9c78d51e7b590a0133134140c04e Mon Sep 17 00:00:00 2001 From: yoavrotems Date: Tue, 17 Dec 2019 02:48:37 +0200 Subject: [PATCH 2/4] Update .travis.yml add goreleaser --- .travis.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 754e89b..77c02bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,16 @@ script: after_success: - bash <(curl -s https://codecov.io/bash) - + +deploy: + - provider: script + skip_cleanup: true + script: curl -sL https://git.io/goreleaser | bash + on: + tags: true + condition: "$TRAVIS_OS_NAME = linux" + + env: matrix: - GO111MODULE=on From 8d08047b2638e8ac7c379c62b6344869d27562fb Mon Sep 17 00:00:00 2001 From: yoavrotems Date: Mon, 23 Dec 2019 19:06:08 +0200 Subject: [PATCH 3/4] Update .goreleaser.yml --- .goreleaser.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index f8aa5f3..ee942c9 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,20 +1,28 @@ env: - GO111MODULE=on + - LINUXBENCH_CFG=/etc/linux-bench/cfg builds: - - main: main.go + - main: . binary: linux-bench goos: - linux goarch: - amd64 + ldflags: + - "-X github.com/aquasecurity/linux-bench/root.cfgDir={{.Env.LINUXBENCH_CFG}}" # Archive customization -archive: - format: tar.gz -nfpm: - vendor: Aqua Security - description: "The Linux Bench for Security is a Go application that checks whether Linux host is deployed according to security best practices" - license: Apache-2.0 - homepage: https://github.com/aquasecurity/linux-bench - formats: - - deb - - rpm \ No newline at end of file +archives: + - id: compress + format: tar.gz + files: + - "cfg/**/*" +nfpms: + - vendor: Aqua Security + description: "Linux-bench checks whether a Linux server according to security best practices as defined in the CIS Distribution-Independent Linux Benchmark" + license: Apache-2.0 + homepage: https://github.com/aquasecurity/linux-bench + files: + "cfg/**/*": "/etc/linux-bench/cfg" + formats: + - deb + - rpm From 2a315f119155cf50662a78db396193bc7bf717ad Mon Sep 17 00:00:00 2001 From: yoavrotems Date: Wed, 8 Jan 2020 03:10:36 +0200 Subject: [PATCH 4/4] Update .gitignore Ignore the goreleaser files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index c57100a..866a9e3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ coverage.txt +linux-bench +dist