Skip to content

Commit 9f46d94

Browse files
Set VERSION on the sdk make build from the workflow so .version file is NOT regenerated.
1 parent 41d922e commit 9f46d94

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

sdk/Makefile

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

55
build: version # Build the project artefact @Pipeline
6-
cd .. && npm run build && cd sdk
6+
echo "HELLO"
7+
cat ../.version
8+
echo "$$(cat ../.version)"
9+
cd .. && npm run build -- "$$(cat .version)" && cd sdk
710
./swagger-static.sh
811

912
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: 0.2.0-20250704.065308+4d8cfb8
1+
version: 0.2.0-20250704.094954+41d922e

sdk/generate-cs.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/sh
22
# run this from directory above, or with npm run generate:ts from parent directory.
33

4+
VERSION=${1:-"$(cat .version)"}
45

56
generate () {
67
set -x
@@ -51,8 +52,6 @@ pack(){
5152
}
5253
prepare(){
5354
mkdir -p sdk/csharp
54-
55-
VERSION="$(cat .version)"
5655
echo $VERSION
5756

5857
SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)"
@@ -62,14 +61,8 @@ prepare(){
6261
echo $NUGET_VERSION
6362
}
6463

64+
echo $VERSION
6565
prepare
6666
generate
6767
build
6868
pack
69-
70-
# sed -i -e 's|https://github.com/GIT_USER_ID/GIT_REPO_ID.git|https://github.com/NHSDigital/nhs-notify-supplier-api.git|g' ./sdk/typescript/package.json
71-
72-
# sed -i -e 's|OpenAPI client for nhsnotifysupplier|NHS Notify Supplier SDK|g' ./sdk/typescript/package.json
73-
# sed -i -e 's|OpenAPI-Generator Contributors|NHS Notify|g' ./sdk/typescript/package.json
74-
75-
# echo $VERSION

0 commit comments

Comments
 (0)