From 23ac2b6c9fee1822d05db61b95580a97ce344f01 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Sun, 23 Feb 2020 21:04:47 +0100 Subject: [PATCH 1/2] Allow to override build date with SOURCE_DATE_EPOCH in order to make builds reproducible. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. Also use UTC to be independent of timezone. This variant only works with GNU date. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4685f5b8..82844c89 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ NAME := k9s PACKAGE := github.com/derailed/$(NAME) GIT := $(shell git rev-parse --short HEAD) -DATE := $(shell date +%FT%T%Z) +SOURCE_DATE_EPOCH ?= $(shell date +%s) +DATE := $(shell date -u -d @${SOURCE_DATE_EPOCH} +%FT%T%Z) VERSION ?= v0.14.0 IMG_NAME := derailed/k9s IMAGE := ${IMG_NAME}:${VERSION} From 2b85f1faa4898ab0ab2b01d866537f3ca54c9a26 Mon Sep 17 00:00:00 2001 From: Christian Vent Date: Thu, 5 Mar 2020 15:36:29 +0100 Subject: [PATCH 2/2] issue-601: changed can-i check from edit to update --- internal/view/browser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/view/browser.go b/internal/view/browser.go index 2fc3f10e..cbb72cd7 100644 --- a/internal/view/browser.go +++ b/internal/view/browser.go @@ -284,7 +284,7 @@ func (b *Browser) editCmd(evt *tcell.EventKey) *tcell.EventKey { } ns, n := client.Namespaced(path) - if ok, err := b.app.Conn().CanI(ns, b.GVR().String(), []string{"edit"}); !ok || err != nil { + if ok, err := b.app.Conn().CanI(ns, b.GVR().String(), []string{"patch"}); !ok || err != nil { b.App().Flash().Err(fmt.Errorf("Current user can't edit resource %s", b.GVR())) return nil }