From c3a98cfba1704678dc3b54910ed1d2d4325303a2 Mon Sep 17 00:00:00 2001 From: Dominik Schulz Date: Wed, 29 Apr 2020 22:05:10 +0200 Subject: [PATCH] Cleanup (#1304) RELEASE_NOTES=n/a Signed-off-by: Dominik Schulz --- .goreleaser-upstream.yml | 115 --------------------------------------- CONTRIBUTING.md | 12 +--- Makefile | 29 +--------- README.md | 2 + go.mod | 1 - go.sum | 2 - 6 files changed, 7 insertions(+), 154 deletions(-) delete mode 100644 .goreleaser-upstream.yml diff --git a/.goreleaser-upstream.yml b/.goreleaser-upstream.yml deleted file mode 100644 index ddaab3eceb..0000000000 --- a/.goreleaser-upstream.yml +++ /dev/null @@ -1,115 +0,0 @@ -# goreleaser.yml -# Release automation -# -# Build customization -build: - binary: gopass - flags: | - -tags netgo -gcflags="-trimpath=$GOPATH" -asmflags="-trimpath=$GOPATH" - env: - - CGO_ENABLED=0 - ldflags: | - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -extldflags '-static' - goos: - - darwin - - freebsd - - linux - - netbsd - - openbsd - - windows - goarch: - - 386 - - amd64 - goarm: - - 6 - - 7 -archive: - name_template: "{{.Binary}}-{{.Version}}-{{.Os}}-{{.Arch}}" - format: tar.gz - format_overrides: - - goos: windows - format: zip - files: - - CHANGELOG.md - - LICENSE - - README.md - - bash.completion - - fish.completion - - zsh.completion - wrap_in_directory: true -release: - github: - owner: gopasspw - name: gopass - draft: false - name_template: '{{ .Version }} / {{ time "2006-01-02" }}' - body_template: '{{ .ReleaseNotes }}' -brew: - github: - owner: gopasspw - name: homebrew-gopass - caveats: | - Gopass has been installed, have fun! - If upgrading from `pass`, everything should work as expected. - If installing from scratch, you need to either initialize a new repository now... - gopass init - ...or clone one from a source: - gopass clone git@code.example.com:example/pass.git - In order to use the great autocompletion features (they're helpful with gopass), - please make sure you have autocompletion for homebrew enabled: - https://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion - More information: - https://www.gopass.pw/ - https://github.com/gopasspw/gopass/README.md - homepage: "https://www.gopass.pw/" - description: "The slightly more awesome Standard Unix Password Manager for Teams." - build_dependencies: - - go - dependencies: - - git - - gnupg - install: | - ENV["GOPATH"] = buildpath - (buildpath/"src/github.com/gopasspw/gopass").install buildpath.children - - cd "src/github.com/gopasspw/gopass" do - ENV["PREFIX"] = prefix - system "make", "install" - end - - system bin/"gopass completion bash > bash_completion.bash" - system bin/"gopass completion zsh > zsh_completion.zsh" - bash_completion.install "bash_completion.bash" - zsh_completion.install "zsh_completion.zsh" - test: | - assert_match version.to_s, shell_output("#{bin}/gopass version") -nfpm: - vendor: Gopass Authors - homepage: "https://www.gopass.pw" - maintainer: "Gopass Authors " - license: MIT - formats: - - deb - - rpm - dependencies: - - git - - gnupg2 - recommends: - - rng-tools -source: - name_template: "{{.Binary}}-{{.Version}}" - excludes: - - "*/gopass-*" - - "*/.git/*" - - "*/.git" - - "*/releases/*" - - "*/dist/*" -checksum: - name_template: "{{.ProjectName}}_{{.Version}}_SHA256SUMS" -sign: - artifacts: checksum -changelog: - extract: CHANGELOG.md -cleanup: - hooks: - - make clean diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 49201ee3f2..5dae06fea0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,6 +35,7 @@ will try to clarify it. * Add a [DCO](https://developercertificate.org/) / `Signed-off-by` line in any commit message. +* Add a RELEASE_NOTES entry in every commit. Set it to n/a for minor changes that are not noteworthy for the changelog. ## Building & Testing @@ -52,20 +53,11 @@ repository. ### Preparation -In order to release gopass we currently rely on a patched version of goreleaser. -While most of our customizations have been submited and merged upstream some had -to be changed to be accepted and others were rejected. We'd like to switch back -to vanilla goreleaser in the future, but this requires some tweaks to the build -and release process. +gopass release should work with the latest upstream version of goreleaser. ```bash -# Install our modified version of goreleaser go get -u github.com/goreleaser/goreleaser cd $GOPATH/src/github.com/goreleaser/goreleaser -git remote add gopass git@github.com:gopasspw/goreleaser.git -git fetch gopass -git checkout gopass -git pull gopass gopass go install ``` diff --git a/Makefile b/Makefile index b07f784b41..1233d93cc0 100644 --- a/Makefile +++ b/Makefile @@ -235,6 +235,7 @@ codequality-nomod: fmt: @gofmt -s -l -w $(GOFILES_NOVENDOR) @clang-format -i $(PROTOFILES) + @go mod tidy fuzz-gpg: mkdir -p workdir/gpg-cli/corpus @@ -254,41 +255,17 @@ check-release-env: ifndef GITHUB_TOKEN $(error GITHUB_TOKEN is undefined) endif -ifndef BINTRAY_USER - $(error BINTRAY_USER is undefined) -endif -ifndef BINTRAY_GPG_PASSPHRASE - $(error BINTRAY_GPG_PASSPHRASE is undefined) -endif -ifndef BINTRAY_API_KEY - $(error BINTRAY_API_KEY is undefined) -endif -release: goreleaser bintray +release: goreleaser goreleaser: check-release-env travis clean @echo ">> RELEASE, goreleaser" @goreleaser -bintray: check-release-env - @echo ">> RELEASE, deb packages" - @$(eval AMD64DEB:=$(shell ls ./dist/gopass-*-amd64.deb | xargs -n1 basename)) - @curl -f -T ./dist/$(AMD64DEB) -H "X-GPG-PASSPHRASE:$(BINTRAY_GPG_PASSPHRASE)" -u$(BINTRAY_USER):$(BINTRAY_API_KEY) "https://api.bintray.com/content/gopasspw/gopass/gopass/v$(GOPASS_VERSION)/pool/main/g/gopass/$(AMD64DEB);deb_distribution=trusty,xenial,bionic,wheezy,jessie,buster,sid;deb_component=main;deb_architecture=amd64;publish=1" - @echo "" - - @$(eval I386DEB:=$(shell ls ./dist/gopass-*-386.deb | xargs -n1 basename)) - @curl -f -T ./dist/$(I386DEB) -H "X-GPG-PASSPHRASE:$(BINTRAY_GPG_PASSPHRASE)" -u$(BINTRAY_USER):$(BINTRAY_API_KEY) "https://api.bintray.com/content/gopasspw/gopass/gopass/v$(GOPASS_VERSION)/pool/main/g/gopass/$(I386DEB);deb_distribution=trusty,xenial,bionic,wheezy,jessie,buster,sid;deb_component=main;deb_architecture=i386;publish=1" - @echo "" - - @echo " CALCULATE METADATA, deb repository" - @curl -f -X POST -H "X-GPG-PASSPHRASE:$(BINTRAY_GPG_PASSPHRASE)" -u$(BINTRAY_USER):$(BINTRAY_API_KEY) https://api.bintray.com/calc_metadata/gopasspw/gopass - @echo "" - @echo ">> DONE" - deps: go build -v ./... upgrade: go get -u -.PHONY: clean build completion install sysinfo crosscompile test codequality release goreleaser debsign bintray +.PHONY: clean build completion install sysinfo crosscompile test codequality release goreleaser debsign diff --git a/README.md b/README.md index 245fdfe88b..3e0889e966 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,8 @@ This project uses [GitHub Flow](https://guides.github.com/introduction/flow/). I We aim for compatibility with the [latest stable Go Release](https://golang.org/dl/) only. +While this project is maintained by volunteers in their free time we aim to triage issues weekly and release a new version at least every quarter. + ## Credit & License gopass was created by the nice folks from [JustWatch](https://www.justwatch.com/gopass) and licensed under the terms of the MIT license. diff --git a/go.mod b/go.mod index 951990f179..eb4f8c184e 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,6 @@ require ( github.com/schollz/closestmatch v0.0.0-20190308193919-1fbe626be92e github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086 github.com/stretchr/testify v1.5.1 - github.com/urfave/cli v1.22.4 github.com/urfave/cli/v2 v2.2.0 golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5 golang.org/x/net v0.0.0-20200421231249-e086a090c8fd diff --git a/go.sum b/go.sum index 6e4bf626dc..4558c47ac2 100644 --- a/go.sum +++ b/go.sum @@ -106,8 +106,6 @@ github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086/go.mod h1:PLPIyL7i github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/urfave/cli v1.22.4 h1:u7tSpNPPswAFymm8IehJhy4uJMlUuU/GmqSkvJ1InXA= -github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.2.0 h1:JTTnM6wKzdA0Jqodd966MVj4vWbbquZykeX1sKbe2C4= github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9 h1:w8V9v0qVympSF6GjdjIyeqR7+EVhAF9CBQmkmW7Zw0w=