This commit is contained in:
parent
f41b0dd2a7
commit
bf56307d33
@ -5,24 +5,7 @@ ENV TIME_ZONE=Amsterdam/Europe
|
|||||||
|
|
||||||
WORKDIR /defold
|
WORKDIR /defold
|
||||||
|
|
||||||
# Get OS Architecture & Platform
|
COPY ./setup.sh /defold/setup.sh
|
||||||
RUN os_arch=$(uname -m | awk '{print tolower($0)}')
|
RUN chmod +x /defold/setup.sh
|
||||||
RUN os_platform=$(uname -s | awk '{print tolower($0)}')
|
RUN /defold/setup.sh
|
||||||
|
|
||||||
# Update APT registry
|
|
||||||
RUN apt-get update -y
|
|
||||||
|
|
||||||
# Install build tools
|
|
||||||
RUN apt-get install -y jq curl unzip
|
|
||||||
|
|
||||||
# Install Java Development Kit
|
|
||||||
RUN apt-get install -y openjdk-17-jdk openjdk-17-jre
|
|
||||||
RUN java --version
|
|
||||||
|
|
||||||
# Get latest stable Defold version and SHA1
|
|
||||||
RUN stable_info=$(curl http://d.defold.com/stable/info.json -s)
|
|
||||||
RUN version=$(echo $stable_info | jq -r '.version')
|
|
||||||
RUN hash=$(echo $stable_info | jq -r '.sha1')
|
|
||||||
|
|
||||||
# Download bob.jar
|
|
||||||
RUN curl -L -o bob.jar https://github.com/defold/defold/releases/download/$version/bob.jar -s
|
|
48
java-defold-bob/setup.sh
Normal file
48
java-defold-bob/setup.sh
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
# Console Colors
|
||||||
|
Color_Off='\033[0m' # Text Reset
|
||||||
|
Black='\033[0;30m' # Black
|
||||||
|
Red='\033[0;31m' # Red
|
||||||
|
Green='\033[0;32m' # Green
|
||||||
|
Yellow='\033[0;33m' # Yellow
|
||||||
|
Blue='\033[0;34m' # Blue
|
||||||
|
Purple='\033[0;35m' # Purple
|
||||||
|
Cyan='\033[0;36m' # Cyan
|
||||||
|
White='\033[0;37m' # White
|
||||||
|
|
||||||
|
# Get OS Architecture & Platform
|
||||||
|
os_arch=$(uname -m | awk '{print tolower($0)}')
|
||||||
|
os_platform=$(uname -s | awk '{print tolower($0)}')
|
||||||
|
|
||||||
|
echo "$Green> OS Architecture: $os_arch $Color_Off"
|
||||||
|
echo "$Green> OS Platform: $os_platform $Color_Off"
|
||||||
|
|
||||||
|
# Update APT registry
|
||||||
|
echo "$Green> Updating APT registry $Color_Off"
|
||||||
|
apt-get update -y -qq
|
||||||
|
echo "$Green> APT registry updated $Color_Off"
|
||||||
|
|
||||||
|
# Install build tools
|
||||||
|
echo "$Green> Installing build tools $Color_Off"
|
||||||
|
apt-get install -y jq curl unzip wget
|
||||||
|
echo "$Green> Build tools installed $Color_Off"
|
||||||
|
|
||||||
|
# Install Java Development Kit
|
||||||
|
echo "$Green> Installing Java Development Kit $Color_Off"
|
||||||
|
apt-get install -y openjdk-17-jdk openjdk-17-jre
|
||||||
|
java --version
|
||||||
|
echo "$Green> Java Development Kit installed $Color_Off"
|
||||||
|
|
||||||
|
# Get latest stable Defold version and SHA1
|
||||||
|
echo "$Green> Getting latest stable Defold version and SHA1 $Color_Off"
|
||||||
|
stable_info=$(curl http://d.defold.com/stable/info.json -s)
|
||||||
|
version=$(echo $stable_info | jq -r '.version')
|
||||||
|
hash=$(echo $stable_info | jq -r '.sha1')
|
||||||
|
|
||||||
|
echo "$Green> Latest stable Defold version: $version $Color_Off"
|
||||||
|
echo "$Green> Latest stable Defold SHA1: $hash $Color_Off"
|
||||||
|
|
||||||
|
# Download bob.jar
|
||||||
|
echo "$Green> Fetching bob.jar $Color_Off"
|
||||||
|
wget https://github.com/defold/defold/releases/download/$version/bob.jar -O bob.jar --progress=bar:force:noscroll --no-check-certificate --quiet
|
||||||
|
java -jar bob.jar --version
|
||||||
|
echo "$Green> bob.jar available $Color_Off"
|
Loading…
x
Reference in New Issue
Block a user