From 1660a915e2e7ffa1c19f7d8fd16af3f7c8c9b88e Mon Sep 17 00:00:00 2001 From: Mikhail Bragin Date: Mon, 14 Mar 2022 13:16:16 +0100 Subject: [PATCH] Fix goreleaser version to 1.6.3 (#266) As status command relies on log, we should always use console as output Co-authored-by: mlsmaycon --- .github/workflows/release.yml | 2 +- .goreleaser.yaml | 2 ++ README.md | 8 ++++---- client/cmd/status.go | 2 +- release_files/post_install.sh | 10 +++++----- release_files/pre_remove.sh | 2 +- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f36d2d674..06ba0a409 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,7 +50,7 @@ jobs: name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: - version: latest + version: 1.6.3 args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 54aa7e191..d214d8e86 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -63,6 +63,7 @@ nfpms: description: Wiretrustee client. homepage: https://wiretrustee.com/ id: deb + bindir: /usr/bin builds: - wiretrustee formats: @@ -76,6 +77,7 @@ nfpms: description: Wiretrustee client. homepage: https://wiretrustee.com/ id: rpm + bindir: /usr/bin builds: - wiretrustee formats: diff --git a/README.md b/README.md index 996e01f5a..3951811a8 100644 --- a/README.md +++ b/README.md @@ -135,12 +135,12 @@ Hosted version: 3. Decompress ```shell tar xcf ./wiretrustee__darwin_amd64.tar.gz - sudo mv wiretrusee /usr/local/bin/wiretrustee - chmod +x /usr/local/bin/wiretrustee + sudo mv wiretrusee /usr/bin/wiretrustee + chmod +x /usr/bin/wiretrustee ``` -After that you may need to add /usr/local/bin in your PATH environment variable: +After that you may need to add /usr/bin in your PATH environment variable: ````shell - export PATH=$PATH:/usr/local/bin + export PATH=$PATH:/usr/bin ```` 4. Install and run the service ```shell diff --git a/client/cmd/status.go b/client/cmd/status.go index 6661f3857..209ed0a65 100644 --- a/client/cmd/status.go +++ b/client/cmd/status.go @@ -18,7 +18,7 @@ var statusCmd = &cobra.Command{ RunE: func(cmd *cobra.Command, args []string) error { SetFlagsFromEnvVars() - err := util.InitLog(logLevel, logFile) + err := util.InitLog(logLevel, "console") if err != nil { log.Errorf("failed initializing log %v", err) return err diff --git a/release_files/post_install.sh b/release_files/post_install.sh index f96d42203..5e6336e71 100644 --- a/release_files/post_install.sh +++ b/release_files/post_install.sh @@ -12,8 +12,8 @@ fi cleanInstall() { printf "\033[32m Post Install of an clean install\033[0m\n" # Step 3 (clean install), enable the service in the proper way for this platform - /usr/local/bin/wiretrustee service install - /usr/local/bin/wiretrustee service start + /usr/bin/wiretrustee service install + /usr/bin/wiretrustee service start } upgrade() { @@ -27,9 +27,9 @@ upgrade() { systemctl daemon-reload fi # will trow an error until everyone upgrade - /usr/local/bin/wiretrustee service uninstall 2> /dev/null || true - /usr/local/bin/wiretrustee service install - /usr/local/bin/wiretrustee service start + /usr/bin/wiretrustee service uninstall 2> /dev/null || true + /usr/bin/wiretrustee service install + /usr/bin/wiretrustee service start } # Check if this is a clean install or an upgrade diff --git a/release_files/pre_remove.sh b/release_files/pre_remove.sh index b6dc755ea..925cd6ab5 100644 --- a/release_files/pre_remove.sh +++ b/release_files/pre_remove.sh @@ -22,7 +22,7 @@ remove() { fi printf "\033[32m Uninstalling the service\033[0m\n" - /usr/local/bin/wiretrustee service uninstall || true + /usr/bin/wiretrustee service uninstall || true if [ "${use_systemctl}" = "True" ]; then