summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorChristopher Davis <brainblasted@disroot.org>2018-12-10 07:19:22 -0500
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2019-02-01 14:12:09 +0000
commit21ea95358d0c208e2d7a1ea06e94b0423616668b (patch)
treeedf005508885de7c68b3a96dae7466f780b023f5 /build-aux
parente8f51a122e082673cacbf78930669715ed2a1c58 (diff)
downloadgnome-todo-21ea95358d0c208e2d7a1ea06e94b0423616668b.tar.gz
CI: remove custom scripts; use initiative template
The CI previously used a set of custom scripts to rename Todo to TodoDevel for the purposes of generating CI bundles. With the changes for paralell these scripts are obsolete. Instead of using the custom scripts, the CI uses the template from the flatpak CI initiative.
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/ci/build-flatpak-bundle.sh9
-rwxr-xr-xbuild-aux/ci/debug.sh52
-rwxr-xr-xbuild-aux/ci/setup.sh97
3 files changed, 0 insertions, 158 deletions
diff --git a/build-aux/ci/build-flatpak-bundle.sh b/build-aux/ci/build-flatpak-bundle.sh
deleted file mode 100755
index c5fc432c..00000000
--- a/build-aux/ci/build-flatpak-bundle.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash -e
-
-PROJECT_ID=org.gnome.$1
-BUNDLE=$PROJECT_ID.flatpak
-MANIFEST=$PROJECT_ID.json
-RUNTIME_REPO="https://sdk.gnome.org/gnome-nightly.flatpakrepo"
-
-flatpak-builder --bundle-sources --repo=repo app $MANIFEST
-flatpak build-bundle repo $BUNDLE --runtime-repo=$RUNTIME_REPO $PROJECT_ID
diff --git a/build-aux/ci/debug.sh b/build-aux/ci/debug.sh
deleted file mode 100755
index 18c40c13..00000000
--- a/build-aux/ci/debug.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/bash -e
-
-function print_headers(){
-
- if [[ -n "${1}" ]]; then
- label_len=${#1}
- span=$(((54 - $label_len) / 2))
-
- echo
- echo "= ======================================================== ="
- printf "%s %${span}s %s %${span}s %s\n" "=" "" "$1" "" "="
- echo "= ======================================================== ="
- else
- echo "= ========================= Done ========================= ="
- echo
- fi
-}
-
-function print_environment(){
-
- local compiler=gcc
-
- echo -n "Processors: "; grep -c ^processor /proc/cpuinfo
- grep ^MemTotal /proc/meminfo
- id; uname -a
- printenv
- echo '-----------------------------------------'
- cat /etc/*-release
- echo '-----------------------------------------'
-}
-
-function check_warnings(){
-
- cat compilation.log | grep "warning:" | awk '{total+=1}END{print "Total number of warnings: "total}'
-}
-
-# ----------- -----------
-if [[ $1 == "environment" ]]; then
- print_headers 'Build environment '
- print_environment
- print_headers
-
-elif [[ $1 == "git" ]]; then
- print_headers 'Commit'
- git log --pretty=format:"%h %cd %s" -1; echo
- print_headers
-
-elif [[ $1 == "warnings" ]]; then
- print_headers 'Warning Report '
- check_warnings
- print_headers
-fi
diff --git a/build-aux/ci/setup.sh b/build-aux/ci/setup.sh
deleted file mode 100755
index 598fb7e4..00000000
--- a/build-aux/ci/setup.sh
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/bin/bash -e
-
-COMMIT=$2
-PROJECT_ID=Todo
-PROJECT_DEVEL_ID=$1
-PROJECT_NAME=gnome-todo
-FLATPAK_MANIFEST=org.gnome.$PROJECT_ID.json
-FLATPAK_DEVEL_MANIFEST=org.gnome.$PROJECT_DEVEL_ID.json
-FLATPAK_DIR=build-aux/flatpak
-
-function copy_flatpak_files() {
-
- echo "Copying Flatpak manifest to root folder"
-
- cp -R ${FLATPAK_DIR}/* . || true
-
- # org.gnome.Todo.json → org.gnome.$PROJECT_DEVEL_ID.json
- mv ${FLATPAK_MANIFEST} ${FLATPAK_DEVEL_MANIFEST} || true
-}
-
-function modify_manifest() {
-
- echo "Modifying Flatpak manifest file…"
-
- # Replace all instances of "org.gnome.Todo" from every file
- echo " - Changing app ID to org.gnome.TodoDevel"
- sed -i "s,\"org\.gnome\.$PROJECT_ID\",\"org\.gnome\.$PROJECT_DEVEL_ID\",g" ${FLATPAK_DEVEL_MANIFEST}
-
- for file in $(grep -rl "org\.gnome\.$PROJECT_ID" data po plugins src)
- do
- echo " Modifying $file"
- sed -i "s,org\.gnome\.$PROJECT_ID,org\.gnome\.$PROJECT_DEVEL_ID,g" $file
- done
-}
-
-function rename_files() {
-
- # org.gnome.Todo.* → org.gnome.<New Suffix>.*
- echo " - Renaming files"
- for file in `find . -type f -name "*org.gnome.$PROJECT_ID[.-]*"`
- do
- new_filename=$(sed "s,org\.gnome\.$PROJECT_ID,org\.gnome\.$PROJECT_DEVEL_ID,g" <<< $file)
-
- echo " Moving $file to $new_filename"
- mv $file $new_filename || true
- done
-}
-
-function change_module_type() {
-
- # This function replaces the "type" : "git" and "url" : "..." by
- # "type" : "dir" and "path" : ".". This allows us to just run
- # `flatpak-builder --repo=repo <JSON Manifest>
-
- echo " - Pointing Flatpak Manifest to the current directory"
-
- # Find the last "{" and use that to calculate the header and tail
- # of the new file
- n_lines=$(wc -l < $FLATPAK_DEVEL_MANIFEST)
- head_lines=$(grep -n "{" org.gnome.TodoDevel.json | cut -f1 -d: | tail -n 1)
-
- header=$(head -n $head_lines $FLATPAK_DEVEL_MANIFEST)
- tail=$(tail -n 5 $FLATPAK_DEVEL_MANIFEST)
-
- echo "$header" > $FLATPAK_DEVEL_MANIFEST
- echo ' "type" : "dir",' >> $FLATPAK_DEVEL_MANIFEST
- echo ' "path" : "."' >> $FLATPAK_DEVEL_MANIFEST
- echo "$tail" >> $FLATPAK_DEVEL_MANIFEST
-}
-
-function print_new_files() {
-
- cat $FLATPAK_DEVEL_MANIFEST
-
- ls -Rl
-}
-
-# ----------------------
-
-echo ""
-echo "Building Flatpak"
-echo ""
-
-# Copy all the files to the root folder
-copy_flatpak_files
-
-# Change the app id to make it parallel installable with stable To Do.
-modify_manifest
-rename_files
-change_module_type
-
-# Print the new filesystem tree and manifest for debugging
-print_new_files
-
-echo ""
-echo "Done"
-echo ""