From 0104aa504b47abf991f0df2f2c535727fec2f325 Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 19 Dec 2022 15:36:39 +0100 Subject: [PATCH] fix(ci): pin nfpm container version and binary location --- .drone.yml | 6 +++--- magefile.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index bd28d4d20..58e759b18 100644 --- a/.drone.yml +++ b/.drone.yml @@ -504,7 +504,7 @@ steps: # Build os packages and push it to our bucket - name: build-os-packages-unstable - image: goreleaser/nfpm + image: goreleaser/nfpm:v2.22.2 pull: true commands: - apk add git go @@ -520,7 +520,7 @@ steps: depends_on: [ after-build-compress ] - name: build-os-packages-version - image: goreleaser/nfpm + image: goreleaser/nfpm:v2.22.2 pull: true commands: - apk add git go @@ -719,6 +719,6 @@ steps: - failure --- kind: signature -hmac: a8937e26dc5d29676571fd36ab58a883e65eee13b6cd0f86b9a115c234179685 +hmac: f3b261d9329113993cdf8ae785daee6f0b2c0ea38662d2714385d7a31f7e5b2f ... diff --git a/magefile.go b/magefile.go index 9cce8eaca..84384107d 100644 --- a/magefile.go +++ b/magefile.go @@ -703,7 +703,7 @@ func (Release) Packages() error { binpath := "nfpm" err = exec.Command(binpath).Run() if err != nil && strings.Contains(err.Error(), "executable file not found") { - binpath = "/nfpm" + binpath = "/usr/bin/nfpm" err = exec.Command(binpath).Run() } if err != nil && strings.Contains(err.Error(), "executable file not found") { @@ -712,7 +712,7 @@ func (Release) Packages() error { os.Exit(1) } - // Because nfpm does not support templating, we replace the values in the config file and restore it after running + // Because nfpm does not support templating, we replace the values in the config file and restore it after running nfpmConfigPath := RootPath + "/nfpm.yaml" nfpmconfig, err := os.ReadFile(nfpmConfigPath) if err != nil {