2025-02-12 06:06:35 -09:00
|
|
|
export mock_image := env("MOCK_IMAGE", "ghcr.io/ublue-os/ublue-builder:latest")
|
|
|
|
|
|
2024-12-12 06:15:54 -09:00
|
|
|
# Run renovate locally to test modules
|
|
|
|
|
renovate dry-run="lookup" log-level="debug":
|
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
if ! command -v "renovate" &> /dev/null ; then
|
|
|
|
|
echo "You need to install renovate first"
|
|
|
|
|
echo "It should be available on brew and on npm."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
if [ "$GITHUB_COM_TOKEN" == "" ] ; then
|
|
|
|
|
echo "Warning: No Github token found, renovate will nag at you for this."
|
|
|
|
|
echo "Set it with GITHUB_COM_TOKEN=(your token)"
|
|
|
|
|
fi
|
|
|
|
|
LOG_LEVEL=${LOG_LEVEL:-debug} renovate --platform=local --dry-run={{dry-run}}
|
|
|
|
|
echo "Updates can be found in a section of the logs called \"packageFiles with updates\""
|
|
|
|
|
|
2025-02-12 06:06:35 -09:00
|
|
|
build $spec *MOCK_ARGS:
|
2024-12-12 06:15:54 -09:00
|
|
|
#!/usr/bin/env bash
|
2025-02-12 06:06:35 -09:00
|
|
|
mkdir -p mock
|
|
|
|
|
# Passes your user to the container and adds it to the mock group else rpkg will not be able to recognize local changes
|
|
|
|
|
# Mock also needs to be called unprivileged apparently
|
|
|
|
|
sudo podman run --privileged --rm -it \
|
|
|
|
|
-v /var/lib/containers:/var/lib/containers:z \
|
|
|
|
|
-v ./mock:/var/lib/mock:Z \
|
|
|
|
|
-v .:/tmp/sources:Z \
|
|
|
|
|
-w /tmp/sources \
|
|
|
|
|
--user "$(id -u):$(id -g)" \
|
|
|
|
|
-e PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin,HOME=/tmp \
|
|
|
|
|
--group-entry "mock:x:135:$(id -nu)" \
|
|
|
|
|
$mock_image \
|
|
|
|
|
$spec {{ MOCK_ARGS }}
|