-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathjustfile
More file actions
134 lines (120 loc) · 3.16 KB
/
Copy pathjustfile
File metadata and controls
134 lines (120 loc) · 3.16 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Build repo
repo:
#!/usr/bin/env bash
set -e
# Build all apps
ls -1 app | while read id
do
just build ${id}
done
cat end-of-life.txt | grep -v '^#' | while read eol
do
id="$(echo "${eol}" | cut -d '=' -f 1)"
rebase="$(echo "${eol}" | cut -d '=' -f 2)"
just eol ${id} ${rebase}
done
gpg_args=()
if [ -n "${DEBEMAIL:-}" ]
then
gpg_args+=(--gpg-sign="${DEBEMAIL}")
fi
# Generate update information and appstream data
set -x
flatpak \
build-update-repo \
"${gpg_args[@]}" \
--generate-static-deltas \
--prune \
repo
# Build app with specified ID
build id:
#!/usr/bin/env bash
set -e
arch="$(flatpak --default-arch)"
gpg_args=()
if [ -n "${DEBEMAIL:-}" ]
then
gpg_args+=(--gpg-sign="${DEBEMAIL}")
fi
set -x
mkdir -p "log/app/{{id}}"
flatpak-builder \
--arch="${arch}" \
--ccache \
--delete-build-dirs \
--force-clean \
"${gpg_args[@]}" \
--install-deps-from=flathub \
--repo=repo \
--require-changes \
--sandbox \
--user \
--verbose \
"build/app/{{id}}/${arch}" \
"app/{{id}}/{{id}}.json" \
2>&1 | tee "log/app/{{id}}/${arch}.txt"
# Build manifests changed from origin/master
build-changed:
#!/usr/bin/env bash
set -e
git fetch origin master
git diff --name-only origin/master...HEAD | grep '^app/' | cut -d / -f2 | sort | uniq | while read id
do
just build ${id}
done
# EOL app with specified id and rebase id
eol id rebase:
#!/usr/bin/env bash
set -e
arch="$(flatpak --default-arch)"
gpg_args=()
if [ -n "${DEBEMAIL:-}" ]
then
gpg_args+=(--gpg-sign="${DEBEMAIL}")
fi
ref="app/{{id}}/${arch}/master"
if ostree --repo=repo show "${ref}"
then
current_rebase="$(ostree --repo=repo show --print-metadata-key=ostree.endoflife-rebase "${ref}" || true)"
if [ "${current_rebase}" == "'app/{{rebase}}/${arch}/master'" ]
then
echo "{{id}} already rebased to {{rebase}}"
else
set -x
mkdir -p "log/eol/{{id}}"
flatpak build-commit-from \
--end-of-life="Application has been renamed to {{rebase}}" \
--end-of-life-rebase="{{id}}={{rebase}}" \
"${gpg_args[@]}" \
--no-update-summary \
--src-repo=repo \
--verbose \
repo \
"${ref}" \
2>&1 | tee "log/eol/{{id}}/${arch}.txt"
fi
else
echo "{{id}} not found, will not try to rebase to {{rebase}}"
fi
clean:
rm -rf build log
distclean: clean
rm -rf .flatpak-builder repo
ostree-log:
#!/usr/bin/env bash
set -e
ostree --repo=repo refs | while read ref
do
ostree --repo=repo log "${ref}"
done
ostree-show:
#!/usr/bin/env bash
set -e
ostree --repo=repo refs | while read ref
do
ostree --repo=repo show "${ref}"
done
ubuntu-deps:
sudo apt-get install --yes \
flatpak \
flatpak-builder