Making the deploying script to attempt clone by itself.
This commit is contained in:
parent
82dbfd5743
commit
b2678ec5b9
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
||||
[submodule "aleta"]
|
||||
path = aleta
|
||||
url = https://gitea.sergiotarxz.freemyip.com/germedeb/aleta-postre
|
@ -1,5 +1,5 @@
|
||||
ARG uid=1000
|
||||
FROM alpine:edge
|
||||
ARG uid=1000
|
||||
|
||||
RUN apk update
|
||||
RUN apk add inkscape
|
||||
|
1
aleta
1
aleta
@ -1 +0,0 @@
|
||||
Subproject commit 8d27a543d1bcea72b92b3a7be487affbd2dce265
|
31
build.sh
31
build.sh
@ -1,5 +1,29 @@
|
||||
#!/bin/bash
|
||||
docker ps &> /dev/null
|
||||
if [ $? != 0 ]; then
|
||||
docker() {
|
||||
sudo $(which docker) "$@"
|
||||
}
|
||||
fi
|
||||
build() {
|
||||
cd -
|
||||
if [ -e output ]; then
|
||||
rm -rf output
|
||||
fi
|
||||
if update_aleta; then
|
||||
mkdir output
|
||||
docker build --no-cache -t aletareleaser:latest . --build-arg uid=$(getent passwd $(whoami) | awk -F: '{ print $3 }')
|
||||
docker run -v $(realpath output):/var/lib/aleta/output --rm aletareleaser
|
||||
else
|
||||
return 1;
|
||||
fi
|
||||
}
|
||||
|
||||
update_aleta() {
|
||||
if [ ! -e aleta ]; then
|
||||
git clone https://gitea.sergiotarxz.freemyip.com/germedeb/aleta-postre aleta
|
||||
return 0;
|
||||
fi
|
||||
cd aleta
|
||||
git fetch
|
||||
current_commit=$(git rev-parse HEAD)
|
||||
@ -10,12 +34,7 @@ build() {
|
||||
fi
|
||||
git pull
|
||||
cd -
|
||||
if [ -e output ]; then
|
||||
rm -rf output
|
||||
fi
|
||||
mkdir output
|
||||
docker build --no-cache -t aletareleaser:latest . --build-arg uid=$(getent passwd $(whoami) | awk -F: '{ print $3 }')
|
||||
docker run -v $(realpath output):/var/lib/aleta/output --rm aletareleaser
|
||||
return 0
|
||||
}
|
||||
|
||||
source ~/.bashrc
|
||||
|
Loading…
Reference in New Issue
Block a user