no message

This commit is contained in:
Roee Gadot
2021-06-17 15:59:43 +03:00
parent 9f6abf7a32
commit 9b44838fed
5 changed files with 12 additions and 46 deletions

View File

@@ -3,8 +3,7 @@ name: Release
on:
push:
branches:
- develop
- main
- my-temp-release-check
jobs:
build:

View File

@@ -1,38 +0,0 @@
name: Tag
on:
push:
branches:
- my-temp-release-check
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Tag
uses: krogon/semver-release-action@master
with:
release_branch: my-temp-release-check
release_strategy: tag
default_increment: patch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# name: Tag
# on:
# push:
# branches:
# - my-temp-release-check
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Tag
# uses: ChorusOne/semver-release-action@workaround-for-org-errors
# with:
# release_branch: my-temp-release-check
# release_strategy: tag
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -7,9 +7,9 @@ BUILD_TIME_UTC=$(shell date -u)
ifeq ($(GIT_BRANCH), master)
# SECONDS_SINCE_START_OF_DAY=$(shell echo $(( $(date -u '+%-H * 3600 + %-M * 60 + %-S') ))) # TODO: in case we do more than once a day
CAL_VER=$(shell date +'%Y.%m.%d')
CAL_VER=$(shell date +'%y.%m.%d')
else
CAL_VER=$(shell date +'%Y.%m.%d.%H.%M.%S')
CAL_VER=$(shell date +'%y.%m.%d.%H.%M.%S')
endif
@@ -23,7 +23,12 @@ install:
go install mizu.go
build: ## build mizu CLI binary (select platform via GOOS / GOARCH env variables)
go build -ldflags="-X 'github.com/up9inc/mizu/cli/mizu.GitCommitHash=$(COMMIT_HASH)' -X 'github.com/up9inc/mizu/cli/mizu.Branch=$(GIT_BRANCH)' -X 'github.com/up9inc/mizu/cli/mizu.CalVer=$(CAL_VER)' -X 'github.com/up9inc/mizu/cli/mizu.BuildTimestamp=$(BUILD_TIMESTAMP)' -X 'github.com/up9inc/mizu/cli/mizu.BuiltTimeUTC=$(BUILD_TIME_UTC)'" -o bin/mizu_$(FOLDER) mizu.go
go build -ldflags="-X 'github.com/up9inc/mizu/cli/mizu.GitCommitHash=$(COMMIT_HASH)' \
-X 'github.com/up9inc/mizu/cli/mizu.Branch=$(GIT_BRANCH)' \
-X 'github.com/up9inc/mizu/cli/mizu.CalVer=$(CAL_VER)' \
-X 'github.com/up9inc/mizu/cli/mizu.BuildTimestamp=$(BUILD_TIMESTAMP)' \
-X 'github.com/up9inc/mizu/cli/mizu.BuildTimeUTC=$(BUILD_TIME_UTC)'" \
-o bin/mizu_$(FOLDER) mizu.go
build-all: ## build for all supported platforms
@echo "Compiling for every OS and Platform"

View File

@@ -20,7 +20,7 @@ var versionCmd = &cobra.Command{
RunE: func(cmd *cobra.Command, args []string) error {
if mizuVersionOptions.DebugInfo {
fmt.Printf("Version: %s \nBranch: %s (%s) \n", mizu.CalVer, mizu.Branch, mizu.GitCommitHash)
fmt.Printf("Build Time: %s (%s)\n", mizu.BuildTimestamp, mizu.BuiltTimeUTC)
fmt.Printf("Build Time: %s (%s)\n", mizu.BuildTimestamp, mizu.BuildTimeUTC)
} else {
fmt.Printf("Version: %s (%s)\n", mizu.CalVer, mizu.Branch)
}

View File

@@ -1,10 +1,10 @@
package mizu
var (
CalVer = "YYYY.MM.DD.HH.mm.ss" // this var is overridden using ldflags in makefile when building
CalVer = "yy.MM.DD.HH.mm.ss" // this var is overridden using ldflags in makefile when building
Branch = "develop"
GitCommitHash = "" // this var is overridden using ldflags in makefile when building
BuiltTimeUTC = "" // this var is overridden using ldflags in makefile when building
BuildTimeUTC = "" // this var is overridden using ldflags in makefile when building
BuildTimestamp = "" // this var is overridden using ldflags in makefile when building
RBACVersion = "v1"
)