diff --git a/projects/getsops.io/package.yml b/projects/getsops.io/package.yml new file mode 100644 index 00000000..ee62ffbd --- /dev/null +++ b/projects/getsops.io/package.yml @@ -0,0 +1,38 @@ +distributable: + url: git+https://github.com/getsops/sops.git + ref: ${{version.tag}} + +versions: + github: getsops/sops + +build: + dependencies: + go.dev: ^1.19 + script: + - go build $GO_ARGS -ldflags="$LDFLAGS" ./cmd/sops + env: + GO_ARGS: + - -trimpath + - -o="{{prefix}}/bin/sops" + LDFLAGS: + - -s + - -w + - -X github.com/getsops/sops/v3/version.Version={{version}} + linux: + LDFLAGS: + - -buildmode=pie + +provides: + - bin/sops + +test: + dependencies: + gnupg.org: '*' + script: + - sops --version | grep {{version}} + - git clone https://github.com/getsops/sops.git + - gpg --import sops/pgp/sops_functional_tests_key.asc + - sops --decrypt sops/example.json > example.dec.json + - cat example.dec.json | grep 'New York' + env: + GPG_HOME: "$(dirname $(which gpg))/../etc/gnupg" \ No newline at end of file