Skip to content

Commit

Permalink
feat(devtools/build): allow version name injection into the outline m…
Browse files Browse the repository at this point in the history
…anager (Jigsaw-Code#1354)

* feat(build): allow version name injection into the outline manager

* add default version name

* ah?

* this?

* this works on other platforms?

* lmao

* try this

* oops i meant this

* put back

* ah
  • Loading branch information
daniellacosse authored May 31, 2023
1 parent e2b446d commit b2639d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/server_manager/electron_app/build.action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ set -eux

PLATFORM=$1
STAGING_PERCENTAGE=100
VERSION_NAME='0.0.0-debug'
BUILD_MODE=debug
for i in "$@"; do
case ${i} in
--buildMode=*)
BUILD_MODE="${i#*=}"
shift
;;
--versionName=*)
VERSION_NAME="${i#*=}"
shift
;;
--stagingPercentage=*)
STAGING_PERCENTAGE="${i#*=}"
shift
Expand Down Expand Up @@ -63,7 +68,8 @@ cp -r "${BUILD_DIR}/server_manager/web_app/static" "${STATIC_DIR}/server_manager
# We also need to install NPMs at this location for require()
# in order for require() to work right in the renderer process, which
# is loaded via a custom protocol.
cp src/server_manager/package.json package-lock.json "${STATIC_DIR}"
cp package-lock.json "${STATIC_DIR}"
sed "s/0.0.0-debug/${VERSION_NAME}/g" src/server_manager/package.json > "${STATIC_DIR}/package.json"
cd "${STATIC_DIR}"
npm ci --prod --ignore-scripts

Expand Down
2 changes: 1 addition & 1 deletion src/server_manager/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "outline-manager",
"productName": "Outline Manager",
"version": "1.14.0",
"version": "0.0.0-debug",
"description": "Create and manage access to Outline servers",
"homepage": "https://getoutline.org/",
"author": {
Expand Down

0 comments on commit b2639d0

Please sign in to comment.