initial commit
This commit is contained in:
29
builder.sh
Executable file
29
builder.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
#todo: make sure all the deps exist???
|
||||
#todo: dynamic versions
|
||||
#todo: justfile??????
|
||||
|
||||
mkdir -p repo cache
|
||||
if [[ ! -f "repo/config" ]]; then
|
||||
pushd repo > /dev/null || exit 1
|
||||
ostree init --repo . --mode=bare-user
|
||||
popd > /dev/null || exit 1
|
||||
fi
|
||||
|
||||
ostree --repo=repo config set 'core.fsync' 'false'
|
||||
|
||||
buildid="$(date '+%Y%m%d.0')"
|
||||
timestamp="$(date --iso-8601=sec)"
|
||||
echo "${buildid}" > .buildid
|
||||
version="$(rpm-ostree compose tree --print-only --repo=repo ./images/minimal/manifest.yaml | jq -r '."releasever"')"
|
||||
echo "Composing ${version}.${buildid} ..."
|
||||
ARGS=(
|
||||
"--cachedir=cache"
|
||||
"--initialize"
|
||||
"--max-layers=96"
|
||||
)
|
||||
|
||||
rpm-ostree compose image "${ARGS[@]}" "./images/minimal/manifest.yaml" "./images/minimal/manifest.ociarchive"
|
||||
Reference in New Issue
Block a user