Skip to content

Commit

Permalink
Merge pull request #182 from openmsupply/178-fix-version-number-on-je…
Browse files Browse the repository at this point in the history
…nkins-build

Add a build-windows command to yarn for jenkins to use
  • Loading branch information
jmbrunskill authored Oct 11, 2023
2 parents 60bdd14 + 744f45d commit 267569e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
14 changes: 14 additions & 0 deletions build_windows.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
IF NOT EXIST version.txt (
ECHO ##### No version.txt found, defaulting to package version #####
node -p "require('./frontend/package.json').version" > version.txt
)

ECHO ##### Prepare notify frontend #####
set /p APP_BUILD_VERSION=<version.txt
echo %APP_BUILD_VERSION%
cd "frontend" && yarn install --force --frozen-lockfile && yarn build-windows
if %errorlevel% neq 0 exit /b %errorlevel%

ECHO ##### Building notify backend #####
cd ../backend && cargo build --release && cargo build --release --bin notify_service
if %errorlevel% neq 0 exit /b %errorlevel%
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"start": "lerna run --scope @notify-frontend/* --parallel start",
"build": "lerna run --scope @notify-frontend/* build",
"build-windows": "lerna run --scope @notify-frontend/* build-windows",
"build-stats": "lerna run --scope @notify-frontend/* build-stats",
"serve": "lerna run --scope @notify-frontend/* --parallel serve",
"clean": "lerna run --scope @notify-frontend/* --parallel clean",
Expand Down Expand Up @@ -70,4 +71,4 @@
"graphql": "^16.3.0",
"lerna": "^4.0.0"
}
}
}
3 changes: 2 additions & 1 deletion frontend/packages/host/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"scripts": {
"start": "webpack-cli serve",
"build": "webpack --env production --env APP_BUILD_VERSION=$APP_BUILD_VERSION",
"build-windows": "webpack --env production --env APP_BUILD_VERSION=%APP_BUILD_VERSION%",
"build-stats": "webpack --env stats --env production",
"serve": "serve dist -p 3007",
"tsc": "tsc"
Expand All @@ -42,4 +43,4 @@
"swc-loader": "^0.2.0",
"webpack-bundle-analyzer": "^4.4.2"
}
}
}

0 comments on commit 267569e

Please sign in to comment.