From 1426823d4076e67b3c71089f401b4019dcea0bd2 Mon Sep 17 00:00:00 2001 From: ChandanChainani Date: Mon, 28 Oct 2024 18:06:57 +0530 Subject: [PATCH] fix(mac): date command options not found #8757 (#8758) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Which Problems Are Solved Closes: #8757 Problem: ```sh ➜ ~ date --rfc-3339=seconds | sed 's/ /T/' date: illegal option -- - usage: date [-jnRu] [-I[date|hours|minutes|seconds]] [-f input_fmt] [-r filename|seconds] [-v[+|-]val[y|m|w|d|H|M|S]] [[[[mm]dd]HH]MM[[cc]yy][.SS] | new_date] [+output_fmt] ``` # How the Problems Are Solved ```sh ➜ date "+%Y-%m-%dT%T%z" | sed -E 's/.([0-9]{2})([0-9]{2})$/-\1:\2/' 2024-10-10T19:09:53-05:30 ➜ TZ=America/Los_Angeles date "+%Y-%m-%dT%T%z" | sed -E 's/.([0-9]{2})([0-9]{2})$/-\1:\2/' 2024-10-10T06:39:41-07:00 ``` - `Mac` support while compiling the source code locally Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 79aaa7f1b2..e728e42b01 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ go_bin := "$$(go env GOPATH)/bin" gen_authopt_path := "$(go_bin)/protoc-gen-authoption" gen_zitadel_path := "$(go_bin)/protoc-gen-zitadel" -now := $(shell date --rfc-3339=seconds | sed 's/ /T/') +now := $(shell date '+%Y-%m-%dT%T%z' | sed -E 's/.([0-9]{2})([0-9]{2})$$/-\1:\2/') VERSION ?= development-$(now) COMMIT_SHA ?= $(shell git rev-parse HEAD) ZITADEL_IMAGE ?= zitadel:local