0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 05:33:03 -05:00
LibreWolf/scripts/fetch-build.sh

37 lines
1.1 KiB
Bash
Raw Normal View History

2021-12-30 07:47:25 -05:00
#!/usr/bin/env bash
set -e
fetch_and_extract() {
2022-01-08 14:28:17 -05:00
rm -rf version source_release
2021-12-30 07:47:25 -05:00
wget -q -O version "https://gitlab.com/librewolf-community/browser/source/-/raw/main/version"
2022-01-08 14:28:17 -05:00
wget -q -O source_release "https://gitlab.com/librewolf-community/browser/source/-/raw/main/release"
2021-12-30 07:47:25 -05:00
2022-01-08 14:28:17 -05:00
rm -f "librewolf-$(cat version)-$(cat source_release).source.tar.gz"
wget -O "librewolf-$(cat version)-$(cat source_release).source.tar.gz" "https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$(cat version)-$(cat source_release).source.tar.gz?job=build-job"
2021-12-30 07:47:25 -05:00
rm -rf librewolf-$(cat version)
2022-01-08 14:28:17 -05:00
tar xf librewolf-$(cat version)-$(cat source_release).source.tar.gz
2021-12-30 07:47:25 -05:00
# here would be a great spot to insert system dependent stuff like mozconfig/patches.
}
build() {
cd librewolf-$(cat version)
./mach build
./mach package
cd ..
}
artifacts() {
# ... Here we do system dependent stuff like builing rpm's, setup.exe or other formats we distribute in
}
build_all() {
fetch_and_extract
build
artifacts
}
build_all