feat: a lot of stuff

This commit is contained in:
Ian
2026-09-30 23:14:15 +02:00
parent a81e2a95b3
commit 34f4c56632
3 changed files with 65 additions and 47 deletions
+2 -3
View File
@@ -5,7 +5,7 @@ SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
UBUNTU_VERSION="${UBUNTU_VERSION:-26.04}"
OPENCODE_VERSION=$(curl -fsSI https://github.com/anomalyco/opencode/releases/latest | sed -n 's/^location:.*\/tag\/v\{0,1\}\(.*\)\r$/\1/ip')
# OPENCODE_VERSION=$(curl -fsSI https://github.com/anomalyco/opencode/releases/latest | sed -n 's/^location:.*\/tag\/v\{0,1\}\(.*\)\r$/\1/ip')
NODE_VERSION=$(curl -fsSL https://nodejs.org/dist/index.json | sed -n 's/.*"version":"v\([^"]*\)".*"lts":".*".*/\1/p' | head -n 1)
IMAGE_REPO="${IMAGE_REPO:-localhost/opencode-dev}"
@@ -48,7 +48,6 @@ if [ ${DRY_RUN} == false ]; then
podman build \
"${NO_CACHE[@]}" \
--build-arg "UBUNTU_VERSION=${UBUNTU_VERSION}" \
--build-arg "OPENCODE_VERSION=${OPENCODE_VERSION}" \
--build-arg "NODE_VERSION=${NODE_VERSION}" \
--build-arg "DEV_UID=${DEV_UID}" \
--build-arg "DEV_GID=${DEV_GID}" \
@@ -58,5 +57,5 @@ if [ ${DRY_RUN} == false ]; then
echo
echo "Built: $IMAGE"
else
echo "running: podman build ${NO_CACHE[@]} --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg OPENCODE_VERSION=${OPENCODE_VERSION} --build-arg NODE_VERSION=${NODE_VERSION} -t $IMAGE"
echo "running: podman build ${NO_CACHE[@]} --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg NODE_VERSION=${NODE_VERSION} -t $IMAGE"
fi