Docker containers: fix create_image.scripts to allow if with wildcards

pull/788/head
pabloFuente 2023-03-15 22:49:54 +01:00
parent 0eb91d8948
commit ff189941bd
2 changed files with 12 additions and 12 deletions

View File

@ -2,16 +2,16 @@
VERSION=$1 VERSION=$1
if [[ ! -z $VERSION ]]; then if [[ ! -z $VERSION ]]; then
if [[ ! -f "./openvidu-server-*.jar" ]]; then if ! ls ./openvidu-server-*.jar 1>/dev/null 2>&1; then
cp ../../target/openvidu-server-*.jar . cp ../../target/openvidu-server-*.jar .
fi if ! ls ./openvidu-server-*.jar 1>/dev/null 2>&1; then
if [[ ! -f "./openvidu-server-*.jar" ]]; then echo "Error: openvidu-server JAR not found"
echo "Error: openvidu-server JAR not found" exit 1
exit 1 fi
fi fi
docker build --pull --no-cache --rm=true -t openvidu/openvidu-dev:$VERSION . docker build --pull --no-cache --rm=true -t openvidu/openvidu-dev:$VERSION .
rm ./openvidu-server.jar rm ./openvidu-server-*.jar
else else
echo "Error: You need to specify a version as first argument" echo "Error: You need to specify a version as first argument"
fi fi

View File

@ -2,12 +2,12 @@
VERSION=$1 VERSION=$1
if [[ ! -z $VERSION ]]; then if [[ ! -z $VERSION ]]; then
if [[ ! -f "./openvidu-server-*.jar" ]]; then if ! ls ./openvidu-server-*.jar 1>/dev/null 2>&1; then
cp ../../target/openvidu-server-*.jar . cp ../../target/openvidu-server-*.jar .
fi if ! ls ./openvidu-server-*.jar 1>/dev/null 2>&1; then
if [[ ! -f "./openvidu-server-*.jar" ]]; then echo "Error: openvidu-server JAR not found"
echo "Error: openvidu-server JAR not found" exit 1
exit 1 fi
fi fi
cp ../utils/discover_my_public_ip.sh ./discover_my_public_ip.sh cp ../utils/discover_my_public_ip.sh ./discover_my_public_ip.sh
@ -15,7 +15,7 @@ if [[ ! -z $VERSION ]]; then
docker build --pull --no-cache --rm=true -t openvidu/openvidu-server:$VERSION . docker build --pull --no-cache --rm=true -t openvidu/openvidu-server:$VERSION .
rm ./openvidu-server.jar rm ./openvidu-server-*.jar
rm ./discover_my_public_ip.sh rm ./discover_my_public_ip.sh
rm ./coturn-shared-key.template rm ./coturn-shared-key.template
else else