condense podman command lines in scripts

This commit is contained in:
Abraham Toriz 2022-11-26 19:43:38 -06:00
parent 4d1e3537df
commit 5d8d80fcfd
No known key found for this signature in database
GPG Key ID: D5B4A746DB5DD42A
4 changed files with 43 additions and 3 deletions

View File

@ -121,13 +121,13 @@ Or build it yourself from this repo:
Then build the artifacts:
podman run -it --rm -w /app -v ./:/app -v tiempo_cargo_index:/usr/local/cargo/registry -e CI_COMMIT_TAG=v1.6rc8 tiempo-build-env ./scripts/build.sh
./scripts/podman-build.sh
To build the archlinux PKGBUILDs (depends on the artifacts folder created by the
previous command):
podman run -it --rm -w /app -v ./:/app:rw -e CI_COMMIT_TAG=v1.6rc8 -e CI_PROJECT_ID=27545092 --uidmap 1000:0:1 --uidmap 0:1:1000 categulario/makepkg ./scripts/release-aur-bin.sh
podman run -it --rm -w /app -v ./:/app:rw -e CI_COMMIT_TAG=v1.6rc8 --uidmap 1000:0:1 --uidmap 0:1:1000 categulario/makepkg ./scripts/release-aur-git.sh
./scripts/podman-build-aur-bin.sh
./scripts/podman-build-aur-git.sh
Both of the previous commands produce PKGBUILDs in the current directory so if
you run both sequentially you'll lose the PKGBUILD of the first command.

14
scripts/podman-build-aur-bin.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
if [[ -z $1 ]]; then
echo "please pass a tag as first argument. Something like v1.6.0"
exit 1
fi
podman run -it --rm \
--workdir /app \
--volume ./:/app \
--env CI_COMMIT_TAG=$1 \
--env CI_PROJECT_ID=27545092 \
--uidmap 1000:0:1 --uidmap 0:1:1000 \
categulario/makepkg ./scripts/release-aur-bin.sh

13
scripts/podman-build-aur-git.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
if [[ -z $1 ]]; then
echo "please pass a tag as first argument. Something like v1.6.0"
exit 1
fi
podman run -it --rm \
--workdir /app \
--volume ./:/app \
--env CI_COMMIT_TAG=$1 \
--uidmap 1000:0:1 --uidmap 0:1:1000 \
categulario/makepkg ./scripts/release-aur-git.sh

13
scripts/podman-build.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
if [[ -z $1 ]]; then
echo "please pass a tag as first argument. Something like v1.6.0"
exit 1
fi
podman run -it --rm \
--workdir /app \
--volume ./:/app \
--volume tiempo_cargo_index:/usr/local/cargo/registry \
--env CI_COMMIT_TAG=$1 \
tiempo-build-env ./scripts/build.sh