From 1a0ee48c86ae7b0d105bfb92375ab7d1aba405e5 Mon Sep 17 00:00:00 2001 From: Ellis Clayton Date: Tue, 3 Dec 2019 10:06:05 +1100 Subject: [PATCH] Allow pass helper to be built for macOS Pass is described as "The Standard Unix Password Manager", and so it can easily run on more than just Linux. Namely, it's supported on macOS. The CLI is identical to the Linux build, which means the Linux helper code for Pass is fully applicable toward the macOS build - a couple of renames being the only needed thing, purely for semantic correctness. --- Jenkinsfile | 1 + Makefile | 3 ++- pass/cmd/{main_linux.go => main.go} | 0 pass/{pass_linux.go => pass.go} | 2 +- pass/{pass_linux_test.go => pass_test.go} | 0 5 files changed, 4 insertions(+), 2 deletions(-) rename pass/cmd/{main_linux.go => main.go} (100%) rename pass/{pass_linux.go => pass.go} (98%) rename pass/{pass_linux_test.go => pass_test.go} (100%) diff --git a/Jenkinsfile b/Jenkinsfile index e43d232c..3fb03a81 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,6 +47,7 @@ pipeline { sh 'make deps fmt lint test' sh 'make osxcodesign' sh 'make osxrelease' + sh 'make pass' archiveArtifacts 'release/docker-credential-*' } } diff --git a/Makefile b/Makefile index 1eb9f08c..6aea9ff2 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ secretservice: pass: mkdir -p bin - go build -o bin/docker-credential-pass pass/cmd/main_linux.go + go build -o bin/docker-credential-pass pass/cmd/main.go wincred: mkdir -p bin @@ -41,6 +41,7 @@ linuxrelease: osxrelease: mkdir -p release cd bin && tar cvfz ../release/docker-credential-osxkeychain-v$(VERSION)-amd64.tar.gz docker-credential-osxkeychain + cd bin && tar cvfz ../release/docker-credential-pass-v$(VERSION)-osx-amd64.tar.gz docker-credential-pass winrelease: mkdir -p release diff --git a/pass/cmd/main_linux.go b/pass/cmd/main.go similarity index 100% rename from pass/cmd/main_linux.go rename to pass/cmd/main.go diff --git a/pass/pass_linux.go b/pass/pass.go similarity index 98% rename from pass/pass_linux.go rename to pass/pass.go index 342e5383..9439884a 100644 --- a/pass/pass_linux.go +++ b/pass/pass.go @@ -21,7 +21,7 @@ import ( const PASS_FOLDER = "docker-credential-helpers" -// Pass handles secrets using Linux secret-service as a store. +// Pass handles secrets using secret-service as a store. type Pass struct{} // Ideally these would be stored as members of Pass, but since all of Pass's diff --git a/pass/pass_linux_test.go b/pass/pass_test.go similarity index 100% rename from pass/pass_linux_test.go rename to pass/pass_test.go