Skip to content

Commit dde51ad

Browse files
Set VERSION on the sdk make build from the workflow so .version file is NOT regenerated.
1 parent f7f30a6 commit dde51ad

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,14 @@
4545
"react": "^19.0.0"
4646
},
4747
"scripts": {
48-
"build": "npm run generate",
49-
"generate": "npm run generate:cs && npm run generate:html && npm run generate:ts && npm run generate:python",
48+
"build": "npm run generate --buildver=$npm_config_buildver",
49+
"generate": "npm run generate:cs --buildver=$npm_config_buildver && npm run generate:html && npm run generate:ts && npm run generate:python",
5050
"generate-dependencies": "npm run generate-dependencies --workspaces --if-present",
51-
"generate:cs": "./sdk/generate-cs.sh",
51+
"generate:cs": "./sdk/generate-cs.sh $npm_config_buildver",
5252
"generate:html": "docker run --rm --user $(id -u) -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/specification/api/notify-supplier.yml -g html -o /local/sdk/html --skip-validate-spec",
5353
"generate:python": "docker run --rm --user $(id -u) -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/specification/api/notify-supplier.yml -g python -o /local/sdk/python --skip-validate-spec",
5454
"generate:ts": "./sdk/generate-ts.sh",
55+
"hello": "echo Hello $npm_config_buildver!",
5556
"lint": "npm run lint --workspaces",
5657
"lint:fix": "npm run lint:fix --workspaces",
5758
"serve": "npm run serve-html-docs",

sdk/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ VERSION ?= ""
33
SHELL = /bin/bash
44

55
build: version # Build the project artefact @Pipeline
6-
VER=$$(cat .version) && cd .. && npm run build -- $$VER && cd sdk
6+
VER=$$(cat .version) && cd .. && npm run build --buildver=$$VER && cd sdk
77
./swagger-static.sh
88

99
clean: # Clean-up project resources (main) @Operations

sdk/_config.version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: 1.1.1-1.1
1+
version: 1.1.1-1.2

0 commit comments

Comments
 (0)