File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 4242endif
4343
4444.PHONY : build/web
45+ build/web : PIPECD_VERSION ?= $(shell git describe --tags --always --abbrev=7 --match 'v[0-9]* .* ')
4546build/web :
46- yarn --cwd web build
47+ PIPECD_VERSION= $( PIPECD_VERSION ) yarn --cwd web build
4748
4849.PHONY : build/chart
4950build/chart : VERSION ?= $(shell git describe --tags --always --dirty --abbrev=7 --match 'v[0-9]* .* ')
@@ -149,6 +150,7 @@ run/pipecd: $(eval TIMESTAMP = $(shell date +%s))
149150# NOTE: previously `git describe --tags` was used to determine the version for running locally
150151# However, this does not work on a forked branch, so the decision was made to hardcode at version 0.0.0
151152# see: https://github.com/pipe-cd/pipecd/issues/4845
153+ run/pipecd : PIPECD_VERSION ?= $(shell git describe --tags --always --dirty --abbrev=7 --match 'v[0-9]* .* ')
152154run/pipecd : BUILD_VERSION ?= "v0.0.0-$(shell git rev-parse --short HEAD) -$(TIMESTAMP ) "
153155run/pipecd : BUILD_COMMIT ?= $(shell git rev-parse HEAD)
154156run/pipecd : BUILD_DATE ?= $(shell date -u '+% Y% m% d-% H% M% S')
@@ -157,7 +159,7 @@ run/pipecd: BUILD_OPTS ?= -ldflags "$(BUILD_LDFLAGS_PREFIX).version=$(BUILD_VERS
157159run/pipecd : CONTROL_PLANE_VALUES ?= ./quickstart/control-plane-values.yaml
158160run/pipecd :
159161 @echo " Building docker image and pushing it to local registry..."
160- docker build -f cmd/pipecd/Dockerfile -t localhost:5001/pipecd:$(BUILD_VERSION ) .
162+ PIPECD_VERSION= $( PIPECD_VERSION ) docker build -f cmd/pipecd/Dockerfile -t localhost:5001/pipecd:$(BUILD_VERSION ) .
161163 docker push localhost:5001/pipecd:$(BUILD_VERSION )
162164
163165 @echo "Installing Control Plane in kind..."
188190endif
189191
190192.PHONY : run/web
193+ run/web : PIPECD_VERSION ?= $(shell git describe --tags --always --abbrev=7 --match 'v[0-9]* .* ')
191194run/web :
192- yarn --cwd web dev
195+ PIPECD_VERSION= $( PIPECD_VERSION ) yarn --cwd web dev
193196
194197.PHONY : run/site
195198run/site :
Original file line number Diff line number Diff line change 55 "private" : true ,
66 "license" : " Apache-2.0" ,
77 "scripts" : {
8- "build" : " PIPECD_VERSION=`git describe --tags --always --dirty --abbrev=7 --match 'v[0-9]*.*'` webpack build --mode production --env htmlTemplate=./base.html --config ./webpack.config.js" ,
9- "dev" : " PIPECD_VERSION=`git describe --tags --always --dirty --abbrev=7 --match 'v[0-9]*.*'` webpack serve --env htmlTemplate=./base.html --config ./webpack.config.dev.js" ,
8+ "build" : " webpack build --mode production --env htmlTemplate=./base.html --config ./webpack.config.js" ,
9+ "dev" : " webpack serve --env htmlTemplate=./base.html --config ./webpack.config.dev.js" ,
1010 "test" : " TZ=Asia/Tokyo jest --config jest.config.local.js" ,
1111 "test:coverage" : " yarn test --coverage" ,
1212 "lint" : " eslint --ext .ts,.tsx ./src" ,
You can’t perform that action at this time.
0 commit comments