Compare commits

...

5 Commits

Author SHA1 Message Date
Bel LaPointe
09ce3d9d9b i think mvp
Some checks failed
cicd / ci (push) Failing after 11s
2025-05-25 12:54:02 -06:00
Bel LaPointe
e040f74873 refactor 2025-05-25 12:36:18 -06:00
Bel LaPointe
c01dfef4ff DEBUG=echo for dev 2025-05-25 12:35:19 -06:00
Bel LaPointe
c8b88b270f DEBUG=echo for dev 2025-05-25 12:35:09 -06:00
Bel LaPointe
e18ca83050 build.sh clones from github 2025-05-25 12:34:20 -06:00
2 changed files with 49 additions and 2 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/work.d

View File

@@ -1,5 +1,51 @@
#! /bin/bash
date
main() {
set -eo pipefail
exit 0
cd_work_d
ytdlp2STRM_d=./ytdlp2STRM
ensure_ytdlp2STRM_git "$ytdlp2STRM_d"
head_ts="$(cd "$ytdlp2STRM_d"; git log -n 1 --format=%as)"
echo head_ts=$head_ts
yt_dlp_latest="$(pip3 index versions yt-dlp | grep LATEST | awk '{print $NF}')"
echo yt_dlp_latest=$yt_dlp_latest
img=registry-app.inhome.blapointe.com:5001/bel/ytdlp2strm
tag=${head_ts}-${yt_dlp_latest}
if docker pull $img:$tag; then
exit 0
fi
cd "$ytdlp2STRM_d"
docker build -t "$img:$tag" .
docker tag "$img:$tag" "$img:latest"
$DEBUG docker push "$img:$tag"
$DEBUG docker push "$img:latest"
}
cd_work_d() {
d="$PWD"
mkdir -p ./work.d
cd ./work.d
cleanup() {
cd "$d"
$DEBUG rm -rf ./work.d || true
}
trap cleanup EXIT
}
ensure_ytdlp2STRM_git() {
if [ ! -d "$1" ]; then
git clone --depth=1 \
https://github.com/fe80Grau/ytdlp2STRM.git \
"$1"
fi
}
if [ "$0" == "$BASH_SOURCE" ]; then
main "$@"
fi