-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·34 lines (27 loc) · 1.02 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
set -o errexit # abort on nonzero exitstatus
set -o nounset # abort on unbound variable
set -o pipefail # don't hide errors within pipes
# The first argument is the branding category
category=$1
# Collect the contant paths
repo=$(realpath ../repo/flatpak)
gpgKey="68070A3C9B5A79C21B76040AB671946A609089F2"
# Update the (alpha) build's metainfo
# TODO: This should work for all categories
npm i
node ./updateMetainfo.js
(
cd "$category"
rm pulse-browser.tar.bz2 || true # We do not care about failues to delete
wget https://pulsebrowser.app/api/download\?platform\=linux\&channel\=$category -O pulse-browser.tar.bz2
flatpak-builder --force-clean build-dir com.fushra.browser.yml
echo
echo "Building repo"
flatpak build-export "$repo" build-dir "$category"
echo
echo "Signing the repository"
flatpak build-sign "$repo" --gpg-sign=$gpgKey --gpg-homedir=~/.gpg
flatpak build-update-repo "$repo" --gpg-sign=$gpgKey --gpg-homedir=~/.gpg
gpg2 --homedir=~/.gpg --export $gpgKey >"$repo"/pulse-browser.gpg
)