Skip to content

Commit

Permalink
Merge pull request #7 from josephbmanley/feature/debugMode
Browse files Browse the repository at this point in the history
Add DebugMode & Update Version
  • Loading branch information
yeslayla authored Mar 16, 2020
2 parents baa1c00 + 6d0ae95 commit 3ba8e15
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
6 changes: 6 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ steps:

Boolean value, when set to true, builds artficat zip file.

#### debugMode

*Optional*

Boolean value, when set to true, runs export in debug mode.

### Outputs

#### build
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ inputs:
required: false
projectDir:
description: 'Location of Godot project in repository'
debugMode:
description: 'Whether or not to use `--export-debug`'
default: false
runs:
using: docker
image: Dockerfile
Expand All @@ -25,6 +28,7 @@ runs:
- ${{ inputs.subdirectory }}
- ${{ inputs.package }}
- ${{ inputs.projectDir }}
- ${{ inputs.debugMode }}
branding:
icon: loader
color: blue
19 changes: 13 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,35 @@
set -e

# Install export templates
wget https://downloads.tuxfamily.org/godotengine/3.2/Godot_v3.2-stable_export_templates.tpz --quiet
wget https://downloads.tuxfamily.org/godotengine/3.2.1/Godot_v3.2.1-stable_export_templates.tpz --quiet
mkdir ~/.cache
mkdir -p ~/.config/godot
mkdir -p ~/.local/share/godot/templates/3.2.stable
unzip Godot_v3.2-stable_export_templates.tpz
mv templates/* ~/.local/share/godot/templates/3.2.stable
rm -f Godot_v3.2-stable_export_templates.tpz
mkdir -p ~/.local/share/godot/templates/3.2.1.stable
unzip Godot_v3.2.1-stable_export_templates.tpz
mv templates/* ~/.local/share/godot/templates/3.2.1.stable
rm -f Godot_v3.2.1-stable_export_templates.tpz

if [ "$3" != "" ]
then
SubDirectoryLocation="$3/"
fi

mode="export"
if [ "$6" = "true" ]
then
mode="export-debug"
fi

# Export for project
echo "Building $1 for $2"
mkdir -p ~/build/${SubDirectoryLocation:-""}
cd ${5-"~"}
godot --export $2 ~/build/${SubDirectoryLocation:-""}$1
godot --${mode} $2 ~/build/${SubDirectoryLocation:-""}$1
cd ~

echo ::set-output name=build::~/build/${SubDirectoryLocation:-""}


if [ "$4" = "true" ]
then
mkdir ~/package
Expand Down
2 changes: 1 addition & 1 deletion test_project/export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
export_path="../../test_project.x86_64"
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
Expand Down

0 comments on commit 3ba8e15

Please sign in to comment.