From 00453dfe95a134228fa30a52f98cfb4a76611ef1 Mon Sep 17 00:00:00 2001 From: Puskar Basu <45908484+pskrbasu@users.noreply.github.com> Date: Wed, 6 Mar 2024 15:18:18 +0530 Subject: [PATCH] Move version.json into internal (#239) --- .github/workflows/01-powerpipe-pre-release.yaml | 2 +- Makefile | 6 +++--- version.json => internal/version/version.json | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename version.json => internal/version/version.json (100%) diff --git a/.github/workflows/01-powerpipe-pre-release.yaml b/.github/workflows/01-powerpipe-pre-release.yaml index 9768f42a..9449fc46 100644 --- a/.github/workflows/01-powerpipe-pre-release.yaml +++ b/.github/workflows/01-powerpipe-pre-release.yaml @@ -41,7 +41,7 @@ jobs: - name: Calculate version id: calculate_version run: | - VERSION_JSON=$(cat powerpipe/version.json) + VERSION_JSON=$(cat powerpipe/internal/version/version.json) MAJOR=$(echo $VERSION_JSON | jq '.major') MINOR=$(echo $VERSION_JSON | jq '.minor') PATCH=$(echo $VERSION_JSON | jq '.patch') diff --git a/Makefile b/Makefile index cb20fc9a..74a7ee88 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,9 @@ GOLANG_CROSS_VERSION ?= v1.21.5 .PHONY: build build: - $(eval MAJOR := $(shell cat version.json | jq '.major')) - $(eval MINOR := $(shell cat version.json | jq '.minor')) - $(eval PATCH := $(shell cat version.json | jq '.patch')) + $(eval MAJOR := $(shell cat internal/version/version.json | jq '.major')) + $(eval MINOR := $(shell cat internal/version/version.json | jq '.minor')) + $(eval PATCH := $(shell cat internal/version/version.json | jq '.patch')) $(eval TIMESTAMP := $(shell date +%Y%m%d%H%M%S)) go build -o $(OUTPUT_DIR) -ldflags "-X main.version=$(MAJOR).$(MINOR).$(PATCH)-dev.$(TIMESTAMP)" . diff --git a/version.json b/internal/version/version.json similarity index 100% rename from version.json rename to internal/version/version.json