Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
work around #42
Browse files Browse the repository at this point in the history
  • Loading branch information
David Bailey committed Apr 13, 2021
1 parent 478dff4 commit df705bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ package_deb_task:
package_deb_script:
- scripts/package-deb.sh &
- scripts/package-deb.sh -b arm64 &
- scripts/package-deb.sh -n notion-enhanced &
- scripts/package-deb.sh -n notion-enhanced -b arm64 &
- scripts/package-deb.sh -n notionenhanced &
- scripts/package-deb.sh -n notionenhanced -b arm64 &
- wait
- "[[ $(ls out/debs | wc -l) == 4 ]]"
deb_artifacts:
Expand All @@ -55,8 +55,8 @@ package_rpm_task:
package_rpm_script:
- scripts/package-rpm.sh &
- scripts/package-rpm.sh -b arm64 &
- scripts/package-rpm.sh -n notion-enhanced &
- scripts/package-rpm.sh -n notion-enhanced -b arm64 &
- scripts/package-rpm.sh -n notionenhanced &
- scripts/package-rpm.sh -n notionenhanced -b arm64 &
- wait
- "[[ $(ls out/rpms | wc -l) == 4 ]]"
rpm_artifacts:
Expand Down
2 changes: 1 addition & 1 deletion scripts/_variables-2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BUILD_DIR=build/build-$NOTION_VERSION-$PACKAGE_REVISION-$BUILD_ARCH
BUILD_DIR_ENHANCED=build/build-enhanced-$NOTION_VERSION-$PACKAGE_REVISION-$BUILD_ARCH
PATH="node_modules/.bin:$PATH"

if [[ "$APP_NAME" == notion-enhanced ]]; then
if [[ "$APP_NAME" == notionenhanced ]]; then
BUILD_DIR=$BUILD_DIR_ENHANCED
PRODUCT_NAME='Notion Enhanced'
fi
Expand Down
8 changes: 4 additions & 4 deletions scripts/enhance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ if ! [ -d "$BUILD_DIR_ENHANCED" ]; then
# Remove the non-enhanced app package
rm -rf "$BUILD_DIR_ENHANCED/notion-desktop-linux-$BUILD_ARCH"

# Replace package name with `notion-enhanced`
sed -i 's/"notion-desktop"/"notion-enhanced"/' "$BUILD_DIR_ENHANCED/app-unpacked/package.json"
# Replace package name with `notionenhanced`
sed -i 's/"notion-desktop"/"notionenhanced"/' "$BUILD_DIR_ENHANCED/app-unpacked/package.json"
fi

if ! [ -f "$BUILD_DIR_ENHANCED/.enhanced" ]; then
Expand All @@ -58,15 +58,15 @@ if ! [ -f "$BUILD_DIR_ENHANCED/.enhanced" ]; then

# Modify Notion Enhancer-patched scripts to point to the correct directories
find "$BUILD_DIR_ENHANCED/app-unpacked" -name '*.js' \
-exec sed -i "s|/usr/lib/notion-desktop|/usr/lib/notion-enhanced|g" {} \; \
-exec sed -i "s|/usr/lib/notion-desktop|/usr/lib/notionenhanced|g" {} \; \
-exec sed -i "s|$PWD/$BUILD_DIR_ENHANCED/app-unpacked/node_modules/notion-enhancer|notion-enhancer|g" {} \;

# Mark as complete
touch "$BUILD_DIR_ENHANCED/.enhanced"
fi

# Create Electron package
if ! [ -d "$BUILD_DIR_ENHANCED/notion-enhanced-linux-$BUILD_ARCH" ]; then
if ! [ -d "$BUILD_DIR_ENHANCED/notionenhanced-linux-$BUILD_ARCH" ]; then
electron-packager "$BUILD_DIR_ENHANCED/app-unpacked" \
--platform linux \
--arch "$BUILD_ARCH" \
Expand Down

0 comments on commit df705bc

Please sign in to comment.