mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 09:30:47 +03:00
Use more modern flatpak build features
This commit is contained in:
parent
ad4ea02547
commit
50f5fc6637
2 changed files with 6 additions and 11 deletions
|
@ -170,15 +170,13 @@ build-flatpak-amd64:
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update && apt-get -y install flatpak-builder git python3 curl python3-aiohttp python3-tenacity gir1.2-ostree-1.0
|
- apt-get update && apt-get -y install flatpak-builder git python3 curl python3-aiohttp python3-tenacity gir1.2-ostree-1.0
|
||||||
- flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
- flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
- flatpak --noninteractive install --user flathub org.kde.Platform//5.15-22.08
|
|
||||||
- flatpak --noninteractive install --user flathub org.kde.Sdk//5.15-22.08
|
|
||||||
# see https://github.com/flatpak/flatpak-builder/issues/495
|
# see https://github.com/flatpak/flatpak-builder/issues/495
|
||||||
- git config --global protocol.file.allow always
|
- git config --global protocol.file.allow always
|
||||||
script:
|
script:
|
||||||
- export VERSION=$(git describe)
|
- export VERSION=$(git describe)
|
||||||
- mkdir -p build-flatpak
|
- mkdir -p build-flatpak
|
||||||
- cd build-flatpak
|
- cd build-flatpak
|
||||||
- flatpak-builder --user --disable-rofiles-fuse --ccache --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date`" app ../io.github.NhekoReborn.Nheko.yaml
|
- flatpak-builder --install-deps-from=flathub --user --disable-rofiles-fuse --ccache --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date`" app ../io.github.NhekoReborn.Nheko.yaml
|
||||||
- flatpak build-bundle repo nheko-amd64.flatpak io.github.NhekoReborn.Nheko ${CI_COMMIT_REF_NAME//\//_}
|
- flatpak build-bundle repo nheko-amd64.flatpak io.github.NhekoReborn.Nheko ${CI_COMMIT_REF_NAME//\//_}
|
||||||
after_script:
|
after_script:
|
||||||
- (cd ./scripts && ./upload-to-flatpak-repo.sh ../build-flatpak/repo) || true
|
- (cd ./scripts && ./upload-to-flatpak-repo.sh ../build-flatpak/repo) || true
|
||||||
|
@ -202,8 +200,6 @@ build-flatpak-arm64:
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update && apt-get -y install flatpak-builder git python3 curl python3-aiohttp python3-tenacity gir1.2-ostree-1.0
|
- apt-get update && apt-get -y install flatpak-builder git python3 curl python3-aiohttp python3-tenacity gir1.2-ostree-1.0
|
||||||
- flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
- flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||||
- flatpak --noninteractive install --user flathub org.kde.Platform//5.15-22.08
|
|
||||||
- flatpak --noninteractive install --user flathub org.kde.Sdk//5.15-22.08
|
|
||||||
# see https://github.com/flatpak/flatpak-builder/issues/495
|
# see https://github.com/flatpak/flatpak-builder/issues/495
|
||||||
- git config --global protocol.file.allow always
|
- git config --global protocol.file.allow always
|
||||||
script:
|
script:
|
||||||
|
@ -211,7 +207,7 @@ build-flatpak-arm64:
|
||||||
- if [ "$(grep MemTotal /proc/meminfo | tr -cd '[0-9]')" -lt "6000000" ]; then export EXTRA_FLAGS='--jobs=3'; fi
|
- if [ "$(grep MemTotal /proc/meminfo | tr -cd '[0-9]')" -lt "6000000" ]; then export EXTRA_FLAGS='--jobs=3'; fi
|
||||||
- mkdir -p build-flatpak
|
- mkdir -p build-flatpak
|
||||||
- cd build-flatpak
|
- cd build-flatpak
|
||||||
- flatpak-builder --user --disable-rofiles-fuse --ccache $EXTRA_FLAGS --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date` for arm64" app ../io.github.NhekoReborn.Nheko.yaml
|
- flatpak-builder --install-deps-from=flathub --user --disable-rofiles-fuse --ccache $EXTRA_FLAGS --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date` for arm64" app ../io.github.NhekoReborn.Nheko.yaml
|
||||||
- flatpak build-bundle repo nheko-arm64.flatpak io.github.NhekoReborn.Nheko ${CI_COMMIT_REF_NAME//\//_}
|
- flatpak build-bundle repo nheko-arm64.flatpak io.github.NhekoReborn.Nheko ${CI_COMMIT_REF_NAME//\//_}
|
||||||
after_script:
|
after_script:
|
||||||
- (cd ./scripts && ./upload-to-flatpak-repo.sh ../build-flatpak/repo) || true
|
- (cd ./scripts && ./upload-to-flatpak-repo.sh ../build-flatpak/repo) || true
|
||||||
|
|
|
@ -6,9 +6,9 @@ if [ -z "$1" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${CI_COMMIT_TAG}" ]; then
|
if [ -n "${CI_COMMIT_TAG}" ]; then
|
||||||
BUILD_URL=$(./flat-manager-client create https://flatpak.neko.dev stable)
|
BUILD_URL=$(./flat-manager-client create --public_download https://flatpak.neko.dev stable)
|
||||||
elif [ "master" = "${CI_COMMIT_REF_NAME}" ]; then
|
elif [ "master" = "${CI_COMMIT_REF_NAME}" ]; then
|
||||||
BUILD_URL=$(./flat-manager-client create https://flatpak.neko.dev nightly)
|
BUILD_URL=$(./flat-manager-client create --public_download https://flatpak.neko.dev nightly)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${BUILD_URL}" ]; then
|
if [ -z "${BUILD_URL}" ]; then
|
||||||
|
@ -18,7 +18,6 @@ fi
|
||||||
|
|
||||||
BUILD_URL=${BUILD_URL/http:/https:}
|
BUILD_URL=${BUILD_URL/http:/https:}
|
||||||
|
|
||||||
./flat-manager-client push $BUILD_URL $1
|
./flat-manager-client push --commit --wait --wait-update $BUILD_URL $1
|
||||||
./flat-manager-client commit --wait $BUILD_URL
|
./flat-manager-client publish --wait --wait-update $BUILD_URL
|
||||||
./flat-manager-client publish --wait $BUILD_URL
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue