blob: f1ec88ed4eb51a24fd7a12a2069f36f3b8c60cab (
plain)
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
|
#!/bin/bash -xe
set -o pipefail
. config
. sh-lib
# Check for dependencies:
package_deps ostree
version="$(cd "${roots:?}"/"${branch:?}"; find ./ -mindepth 1 -maxdepth 1 -type d | cut -d/ -f2 | sort -rn | head -1)"
if [ ! -d "$repo" ]; then
mkdir -p "$repo"
ostree --repo="$repo" init --mode=archive
fi
REF=$(ostree --repo="$build_repo" rev-parse "$branch")
ostree --repo="$repo" pull-local "$build_repo" "$REF"
ostree --repo="$repo" commit -b "$branch" \
-s "$osname/$osversion:($osdesc) $branch $version" \
--add-metadata-string=version="$branch":"$version" \
--gpg-sign=91BC029A6B3701253B585656C5FE25B2138B1F0F \
--tree=ref="$REF"
ostree --repo="$repo" static-delta generate "$branch" || echo "Warning: static-delta generate failed, (they grow up so fast...)" >&2
ostree --repo="$repo" summary -u
|