-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bd0322
commit 2628c94
Showing
9 changed files
with
138 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
language: csharp | ||
script: scripts/test.sh | ||
language: objective-c | ||
os: osx | ||
|
||
env: | ||
- UNITY_PROJECT_PATH="Action Race" | ||
|
||
before_install: | ||
- chmod a+x ./travis-scripts/*.sh | ||
|
||
install: | ||
- ./travis-scripts/install.sh | ||
|
||
script: | ||
- ./travis-scripts/build.sh | ||
|
||
after_script: | ||
- ./travis-scripts/deploy.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using UnityEditor; | ||
|
||
public class AppBuilder | ||
{ | ||
public static void Build() | ||
{ | ||
string[] scenes = { "Assets/Scenes/MainMenuScene.unity", "Assets/Scenes/Small Map.unity" }; | ||
BuildPipeline.BuildPlayer(scenes, "Build/WebGL", BuildTarget.WebGL, BuildOptions.None); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#! /bin/sh | ||
|
||
PROJECT_PATH="$(pwd)/$UNITY_PROJECT_PATH" | ||
WEBGL_DIR="$PROJECT_PATH/Build/WebGL" | ||
|
||
echo "Building WebGL..." | ||
/Applications/Unity/Unity.app/Contents/MacOS/Unity \ | ||
-batchmode \ | ||
-nographics \ | ||
-silent-crashes \ | ||
-logFile \ | ||
-projectPath "$(PROJECT_PATH)" \ | ||
-executeMethod AppBuilder.Build \ | ||
-quit | ||
|
||
echo "Zip WebGL files..." | ||
zip -r nokia-game.zip "$WEBGL_DIR/Build" "$WEBGL_DIR/TemplateData" "$WEBGL_DIR/index.html" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#! /bin/sh | ||
|
||
if [[ -z "${BUTLER_API_KEY}" ]]; then | ||
echo "Unable to deploy! No BUTLER_API_KEY environment variable specified!" | ||
exit 1 | ||
fi | ||
|
||
prepare_butler() { | ||
echo "Preparing butler..." | ||
download_if_not_exist https://broth.itch.ovh/butler/darwin-amd64/LATEST/archive/default butler.zip | ||
unzip butler.zip | ||
chmod +x butler | ||
} | ||
|
||
prepare_and_push() { | ||
echo "Push $3 build to itch.io..." | ||
./butler push $2 $1:$3 | ||
} | ||
|
||
download_if_not_exist() { | ||
if [ ! -f $2 ]; then | ||
curl -L -o $2 $1 | ||
fi | ||
} | ||
|
||
echo "jestem w $(pwd)" | ||
|
||
project="tomkul777/nokia-game" | ||
artifact="nokia-game.zip" | ||
platform="windows-beta" | ||
|
||
prepare_butler | ||
|
||
prepare_and_push $project $artifact $platform | ||
|
||
echo "Done." | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#! /bin/sh | ||
|
||
UNITY_DOWNLOAD_CACHE="$(pwd)/unity_download_cache" | ||
UNITY_OSX_PACKAGE_URL="https://download.unity3d.com/download_unity/46dda1414e51/MacEditorInstaller/Unity-2017.2.0f3.pkg" | ||
UNITY_WEBGL_URL="https://beta.unity3d.com/download/46dda1414e51/MacEditorTargetInstaller/UnitySetup-WebGL-Support-for-Editor-2017.2.0f3.pkg" | ||
|
||
#UNITY_OSX_PACKAGE_URL="https://download.unity3d.com/download_unity/4f139db2fdbd/MacEditorInstaller/Unity.pkg" | ||
#UNITY_WEBGL_URL="https://download.unity3d.com/download_unity/4f139db2fdbd/MacEditorTargetInstaller/UnitySetup-WebGL-Support-for-Editor-2019.3.4f1.pkg" | ||
|
||
# Downloads a file if it does not exist | ||
download() { | ||
|
||
URL=$1 | ||
FILE=`basename "$URL"` | ||
|
||
# Downloads a package if it does not already exist in cache | ||
if [ ! -e $UNITY_DOWNLOAD_CACHE/`basename "$URL"` ] ; then | ||
echo "$FILE does not exist. Downloading from $URL: " | ||
mkdir -p "$UNITY_DOWNLOAD_CACHE" | ||
curl -o $UNITY_DOWNLOAD_CACHE/`basename "$URL"` "$URL" | ||
else | ||
echo "$FILE Exists. Skipping download." | ||
fi | ||
} | ||
|
||
# Downloads and installs a package from an internet URL | ||
install() { | ||
PACKAGE_URL=$1 | ||
download $1 | ||
|
||
echo "Installing `basename "$PACKAGE_URL"`" | ||
sudo installer -dumplog -package $UNITY_DOWNLOAD_CACHE/`basename "$PACKAGE_URL"` -target / | ||
} | ||
|
||
echo "Installing Unity..." | ||
install $UNITY_OSX_PACKAGE_URL | ||
install $UNITY_WEBGL_URL |