Skip to content

Commit e2cd4c8

Browse files
Add support for Notifications and Premium packages in installation scripts
1 parent 7545f03 commit e2cd4c8

3 files changed

Lines changed: 24 additions & 8 deletions

File tree

.dappnode_profile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export DAPPMANAGER_VERSION="${DAPPMANAGER_VERSION:-0.2.99}"
1414
export WIFI_VERSION="${WIFI_VERSION:-0.2.9}"
1515
export WIREGUARD_VERSION="${WIREGUARD_VERSION:-0.1.3}"
1616
export HTTPS_VERSION="${HTTPS:-0.2.2}"
17+
export NOTIFICATIONS_VERSION="/ipfs/QmQubxH4WgqEFxvFntef4H2DmuU6mxBRS6XeuShc3owNi9"
18+
export PREMIUM_VERSION="/ipfs/QmXDddoa56HkrvtkGsa3mozpsn9SzQZtoVBWgagcW6SsHy"
1719

1820
export DAPPNODE_DIR="/usr/src/dappnode"
1921
export DAPPNODE_CORE_DIR="${DAPPNODE_DIR}/DNCORE"

.github/workflows/release.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ on:
2626
vpn:
2727
description: "Version of the OpenVPN Package. Only numbers"
2828
required: true
29+
notifications:
30+
description: "IPFS hash of the Notifications Package. Must start with /ipfs/"
31+
required: true
32+
premium:
33+
description: "IPFS hash of the Premium Package. Must start with /ipfs/"
34+
required: true
2935

3036
jobs:
3137
set-versions:
@@ -39,13 +45,16 @@ jobs:
3945
wireguard: ${{ steps.set_outputs.outputs.wireguard }}
4046
https: ${{ steps.set_outputs.outputs.https }}
4147
vpn: ${{ steps.set_outputs.outputs.vpn }}
48+
notifications: ${{ steps.set_outputs.outputs.notifications }}
49+
premium: ${{ steps.set_outputs.outputs.premium }}
4250
core: ${{ steps.set_outputs.outputs.core }}
4351
steps:
4452
- name: Check versions regex
4553
run: |
4654
[[ "${{ github.event.inputs.bind }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.event.inputs.ipfs }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.event.inputs.dappmanager }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && \
4755
[[ "${{ github.event.inputs.wifi }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.event.inputs.wireguard }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.event.inputs.https }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && \
48-
[[ "${{ github.event.inputs.vpn }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.event.inputs.core }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "versions introduced in wrong format"; exit 1; }
56+
[[ "${{ github.event.inputs.vpn }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.event.inputs.core }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && \
57+
[[ "${{ github.event.inputs.notifications }}" =~ ^/ipfs/.+$ ]] && [[ "${{ github.event.inputs.premium }}" =~ ^/ipfs/.+$ ]] || { echo "versions introduced in wrong format"; exit 1; }
4958
- name: Checkout
5059
uses: actions/checkout@v4
5160
- name: Set new versions
@@ -56,7 +65,9 @@ jobs:
5665
sed -i -e "/DAPPMANAGER_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.dappmanager }}"/" .dappnode_profile
5766
sed -i -e "/WIFI_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.wifi }}"/" .dappnode_profile
5867
sed -i -e "/WIREGUARD_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.wireguard }}"/" .dappnode_profile
59-
sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.https }}"/" .dappnode_profile
68+
sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/${{ github.event.inputs.https }}/" .dappnode_profile
69+
sed -i -e "s|^export NOTIFICATIONS_VERSION=.*|export NOTIFICATIONS_VERSION=\"${{ github.event.inputs.notifications }}\"|" .dappnode_profile
70+
sed -i -e "s|^export PREMIUM_VERSION=.*|export PREMIUM_VERSION=\"${{ github.event.inputs.premium }}\"|" .dappnode_profile
6071
cat .dappnode_profile
6172
- name: Create dappnode_profile.sh
6273
run: cp .dappnode_profile dappnode_profile.sh
@@ -76,6 +87,8 @@ jobs:
7687
echo "wireguard=${{ github.event.inputs.wireguard }}" >> $GITHUB_OUTPUT
7788
echo "https=${{ github.event.inputs.https }}" >> $GITHUB_OUTPUT
7889
echo "vpn=${{ github.event.inputs.vpn }}" >> $GITHUB_OUTPUT
90+
echo "notifications=${{ github.event.inputs.notifications }}" >> $GITHUB_OUTPUT
91+
echo "premium=${{ github.event.inputs.premium }}" >> $GITHUB_OUTPUT
7992
8093
build-debian-attended:
8194
name: Build Debian attended ISO

scripts/dappnode_install.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ is_port_used() {
540540
determine_packages() {
541541
# Global override: minimal install, regardless of OS.
542542
if [[ "${MINIMAL}" == "true" ]]; then
543-
PKGS=(BIND VPN WIREGUARD DAPPMANAGER)
543+
PKGS=(BIND VPN WIREGUARD DAPPMANAGER NOTIFICATIONS PREMIUM)
544544
log "Minimal mode enabled; overriding packages"
545545
log "Packages to be installed: ${PKGS[*]}"
546546
log "PKGS: ${PKGS[*]}"
@@ -561,23 +561,24 @@ determine_packages() {
561561

562562
if is_always_on_mac; then
563563
if [ "$IS_PORT_USED" == "true" ]; then
564-
PKGS=(BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI)
564+
PKGS=(BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI NOTIFICATIONS PREMIUM)
565565
else
566-
PKGS=(BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI HTTPS)
566+
PKGS=(BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI HTTPS NOTIFICATIONS PREMIUM)
567567
fi
568568
else
569-
PKGS=(BIND VPN WIREGUARD DAPPMANAGER)
569+
PKGS=(BIND VPN WIREGUARD DAPPMANAGER NOTIFICATIONS PREMIUM)
570570
fi
571571
else
572572
# Linux / ISO logic
573573
is_iso_install
574574
is_port_used
575575
if [ "$IS_PORT_USED" == "true" ]; then
576-
PKGS=(BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI)
576+
PKGS=(BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI NOTIFICATIONS PREMIUM)
577577
else
578-
PKGS=(HTTPS BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI)
578+
PKGS=(HTTPS BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI NOTIFICATIONS PREMIUM)
579579
fi
580580
fi
581+
581582
log "Packages to be installed: ${PKGS[*]}"
582583

583584
# Debug: print all PKGS and their version variables

0 commit comments

Comments
 (0)