Skip to content
Snippets Groups Projects
Verified Commit fe690ca3 authored by Louis's avatar Louis :fire:
Browse files

Install export templates alongside Godot

parent 1a663af3
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,6 @@ ARG PLATFORM="linux.x86_64"
ARG GODOT_VERSION="4.3-stable"
ARG BUTLER_VERSION="15.12.0"
ENV BUTLER_API_KEY=""
RUN apt-get update \
&& apt-get install -y wget zip unzip libfontconfig1 \
&& rm -rf /var/lib/apt/lists/*
......@@ -18,6 +16,6 @@ COPY commands/godot_project_title.sh /usr/bin/godot_project_title
COPY commands/butler_install.sh /usr/bin/butler_install
COPY commands/butler_upload.sh /usr/bin/butler_upload
RUN chmod +x /usr/bin/godot_* /usr/bin/butler_* && \
godot_install $GODOT_VERSION $PLATFORM && cp ./godot /usr/bin/godot && \
butler_install $BUTLER_VERSION
\ No newline at end of file
RUN chmod +x /usr/bin/godot_* /usr/bin/butler_*
RUN godot_install $GODOT_VERSION $PLATFORM
RUN butler_install $BUTLER_VERSION
\ No newline at end of file
......@@ -3,13 +3,25 @@
VERSION="$1"
PLATFORM="$2"
TMP_PATH="/tmp/godot"
mkdir -p "$TMP_PATH"
SAFE_VERSION=$(echo "$VERSION" | sed -nE 's/-/./p')
TMP_ROOT="/tmp/godot"
mkdir -p "$TMP_ROOT"
BINARY_NAME="Godot_v${VERSION}_${PLATFORM}"
TMP_PATH="$TMP_PATH/godot_${VERSION}_${PLATFORM}.zip"
TMP_PATH="$TMP_ROOT/godot_${VERSION}_${PLATFORM}.zip"
LOCAL_PATH="$HOME/.local/share/godot/export_templates/$SAFE_VERSION"
ARTIFACT_PATH="https://github.com/godotengine/godot-builds/releases/download/${VERSION}/${BINARY_NAME}.zip"
TEMPLATES_PATH="https://github.com/godotengine/godot/releases/download/${VERSION}/Godot_v${VERSION}_export_templates.tpz"
wget -O "$TMP_PATH" "$ARTIFACT_PATH"
unzip -o "$TMP_PATH" -d "$(pwd)"
mv "$BINARY_NAME" godot
\ No newline at end of file
mv "$BINARY_NAME" /usr/bin/godot
mkdir -p "$LOCAL_PATH"
wget -O "${TMP_ROOT}/templates.tpz" "$TEMPLATES_PATH"
unzip -o "${TMP_ROOT}/templates.tpz" -d "${TMP_ROOT}/godot_templates"
mv -r "${TMP_ROOT}/godot_templates/*" "$LOCAL_PATH/"
rm -r "$TMP_ROOT"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment