Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

ci: add postinst & postrm scripts to linux deb package

ramanverma2k319c358d1b14
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 8dc8326190..27ad3c4adc 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -85,6 +85,23 @@ jobs:
Maintainer: AppFlowy
Description: An Open Source Alternative to Notion\n' "${{ github.ref_name }}" > DEBIAN/control
+ # postinst script for creating symlink
+ printf '#!/bin/bash
+ if [ -e /usr/local/bin/appflowy ]; then
+ echo "Symlink already exists, skipping."
+ else
+ echo "Creating Symlink in /usr/local/bin/appflowy"
+ ln -s /opt/AppFlowy/app_flowy /usr/local/bin/appflowy
+ fi' > DEBIAN/postinst
+ chmod 0755 DEBIAN/postinst
+
+ # postrm script for cleaning up residuals
+ printf '#!/bin/bash
+ if [ -e /usr/local/bin/appflowy ]; then
+ rm /usr/local/bin/appflowy
+ fi' > DEBIAN/postrm
+ chmod 0755 DEBIAN/postrm
+
mkdir -p usr/share/applications
# Update Exec & icon path in desktop entry
grep -rl "\[CHANGE_THIS\]" ./opt/AppFlowy/appflowy.desktop.temp | xargs sed -i "s/\[CHANGE_THIS\]/\/opt/"