-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from RemoteTechnologiesGroup/master
MasterMerge
- Loading branch information
Showing
30 changed files
with
461 additions
and
310 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
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,25 @@ | ||
language: objective-c # force osx machines | ||
|
||
os: | ||
- osx | ||
|
||
env: | ||
global: | ||
- secure: Q4UfP54tnvoioOnoQElnkUQMd4qQ/2dLLkhnSz35MiwUrraxqrixdh22EWsTmcqD8ntjPI4tt3P9N6On9+qn8D+qYpt+zX5otikfgvXdKCxGJj+q1Nv0rWq6b0P5QGo61vXFV1cH4EOONBDyAq0IbmtjtEISBhQaefFdzaAAk/Y= | ||
- secure: J/M1/WIRgP4GssMr9HS9k7Wr9XUqlo0S+olIVWvr8eY8jxxVbx+ONZbkkjKey2BvC1BRVtRXpbBe+YcPLYe7V1jG5mmm3Lc1B/x5WC54q4KKfoV53m+ARAtaHFYrJY2h4O+GLaysQoCwCG/tAt0GhJmgJgy9IojH4ojJjDOGHCE= | ||
before_install: | ||
- date -u | ||
- uname -a | ||
- export BUILDTAG=`git describe --abbrev=0 --tags` | ||
- env | sort | grep -v ZIPPASSWORD | grep -v GITHUB_TOKEN | ||
|
||
install: | ||
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then echo "Should only be on OSX"; exit 1; fi | ||
- ./CI/travis.osx.install.deps.sh # it appears TRAVIS_OS_NAME is unset often, assume we're OSX if not linux | ||
|
||
script: | ||
- ./build.remotetech2.sh | ||
|
||
# Custom deploy | ||
after_success: | ||
- ./CI/github.build.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/bin/bash | ||
|
||
# These should be set by Travis | ||
#TRAVIS_BUILD_NUMBER=1 | ||
#TRAVIS_BRANCH=master | ||
#TRAVIS_REPO_SLUG="RemoteTechnologiesGroup/RemoteTech" | ||
#TRAVIS_COMMIT=master | ||
#GITHUB_TOKEN="Personal access token from https://github.com/settings/applications" | ||
#TRAVIS_PULL_REQUEST=false | ||
|
||
VERSION="build-${TRAVIS_BRANCH}-${TRAVIS_BUILD_NUMBER}" | ||
FILENAME=$(echo "${VERSION}.zip" | tr '/' '_') # else it will fail on branches like chore/travis | ||
|
||
python_parse_json() { | ||
# python errors are surpressed for when the key doesn't exist | ||
cat | python -c 'import sys,json;obj=json.load(sys.stdin);print obj[sys.argv[1]];' $1 2>/dev/null | ||
} | ||
|
||
if [ -z "$GITHUB_TOKEN" ] || [ -z "$TRAVIS_REPO_SLUG" ] \ | ||
|| [ -z "$TRAVIS_BUILD_NUMBER" ] || [ -z "$TRAVIS_BRANCH" ] \ | ||
|| [ -z "$TRAVIS_COMMIT" ] | ||
then | ||
echo "GITHUB_TOKEN, TRAVIS_REPO_SLUG, TRAVIS_BUILD_NUMBER and TRAVIS_COMMIT must be set in order to deploy"; | ||
echo "Skipping deploy for now"; | ||
exit 0; # prevent build failing if unset | ||
fi | ||
|
||
if [ "$TRAVIS_PULL_REQUEST" != "false" ] | ||
then | ||
echo "This is a pull request build, it doesn't need to be released." | ||
exit 0; # prevent build fail | ||
fi | ||
|
||
if [[ "$TRAVIS_BRANCH" == build* ]] | ||
then | ||
echo "We're already on a 'build branch' (or tag), don't need to deploy again"; | ||
exit 0; | ||
fi | ||
|
||
echo "Build ${TRAVIS_BUILD_NUMBER} from branch ${TRAVIS_BRANCH} in ${TRAVIS_REPO_SLUG}" > GameData/build.txt | ||
echo "Built from commit ${TRAVIS_COMMIT} with tag ${BUILDTAG}" >> GameData/build.txt | ||
echo "Creating ${FILENAME}" | ||
zip -r "${FILENAME}" GameData/ | ||
|
||
echo "Attempting to create tag ${VERSION} on ${TRAVIS_REPO_SLUG}" | ||
API_JSON=$(printf '{"tag_name": "%s","target_commitish": "%s","name": "%s","body": "Automated pre-release of branch %s build %s","draft": false,"prerelease": true}' \ | ||
$VERSION $TRAVIS_COMMIT $VERSION $TRAVIS_BRANCH $TRAVIS_BUILD_NUMBER) | ||
ADDRESS=$(printf 'https://api.github.com/repos/%s/releases?access_token=%s' $TRAVIS_REPO_SLUG $GITHUB_TOKEN) | ||
|
||
REPLY=$(curl --data "$API_JSON" "$ADDRESS"); | ||
UPLOAD_ID=$(echo $REPLY | python_parse_json "id") | ||
ERRORS=$(echo $REPLY | python_parse_json "errors"); | ||
|
||
if [ -n "$ERRORS" ] || [ -z "$REPLY" ] || [ -z "$UPLOAD_ID" ] | ||
then | ||
echo "ERROR: An error occured while setting the tag"; | ||
echo $REPLY; | ||
exit 1; | ||
fi | ||
|
||
UPLOAD_URL="https://uploads.github.com/repos/${TRAVIS_REPO_SLUG}/releases/${UPLOAD_ID}/assets" | ||
|
||
echo "Uploading ${FILENAME} to GitHub repo ${UPLOAD_ID} (tag ${VERSION} on ${TRAVIS_REPO_SLUG})" | ||
REPLY=$(curl -H "Authorization: token ${GITHUB_TOKEN}" \ | ||
-H "Accept: application/vnd.github.manifold-preview" \ | ||
-H "Content-Type: application/zip" \ | ||
--data-binary @${FILENAME} \ | ||
"${UPLOAD_URL}?name=${FILENAME}") | ||
|
||
ERRORS=$(echo $REPLY | python_parse_json "errors") | ||
ASSET_ID=$(echo $REPLY | python_parse_json "id" ) | ||
|
||
if [ -n "$ERRORS" ] || [ -z "$REPLY" ] || [ -z "$ASSET_ID" ] | ||
then | ||
echo "ERROR: An error occured while uploading the file to GitHub"; | ||
echo $REPLY; | ||
exit 1; | ||
fi | ||
|
||
echo "Uploaded ${FILENAME} to ${TRAVIS_REPO_SLUG} as asset id ${ASSET_ID}" |
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,8 @@ | ||
#!/bin/bash | ||
set -ev | ||
|
||
MONO_VERSION="3.4.0" | ||
|
||
echo "Installing Mono ${MONO_VERSION}" | ||
wget "http://download.mono-project.com/archive/${MONO_VERSION}/macos-10-x86/MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" | ||
sudo installer -pkg "MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" -target / |
Binary file not shown.
Binary file not shown.
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,16 @@ | ||
{ | ||
"NAME": "RemoteTech", | ||
"URL": "https://raw.githubusercontent.com/RemoteTechnologiesGroup/RemoteTech/master/GameData/RemoteTech2/RemoteTech.version", | ||
"DOWNLOAD": "https://github.com/RemoteTechnologiesGroup/RemoteTech/releases/latest", | ||
"_comment": "Use old-style format to keep compatibility with KSP-AVC Utility 0.3.", | ||
"VERSION": { | ||
"MAJOR": 1, | ||
"MINOR": 4, | ||
"PATCH": 0 | ||
}, | ||
"KSP_VERSION": { | ||
"MAJOR": 0, | ||
"MINOR": 23, | ||
"PATCH": 5 | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,4 +1,14 @@ | ||
[![Build Status](https://travis-ci.org/RemoteTechnologiesGroup/RemoteTech.svg?branch=master)](https://travis-ci.org/RemoteTechnologiesGroup/RemoteTech) | ||
|
||
RemoteTech | ||
========== | ||
|
||
Community developed continuation of Kerbal Space Program's RemoteTech mod. | ||
|
||
RemoteTech allows you to construct vast relay networks of communication satellites and remotely controlled unmanned vehicles. Your unmanned vessels require an uplink to a command station to be controlled. This adds a new layer of difficulty that compensates for the lack of live crew members. | ||
|
||
[Download Here](https://github.com/RemoteTechnologiesGroup/RemoteTech/releases/latest) | ||
|
||
A [detailed manual](http://remotetechnologiesgroup.github.io/RemoteTech) is available on-line. | ||
|
||
Questions? Try the [KSP forum thread](http://forum.kerbalspaceprogram.com/threads/56399). |
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,36 @@ | ||
#!/bin/bash | ||
|
||
SRCDIR=src/RemoteTech2 | ||
|
||
if [ ! -f "$SRCDIR/Assembly-CSharp-firstpass.dll" ] \ | ||
|| [ ! -f "$SRCDIR/Assembly-CSharp.dll" ] \ | ||
|| [ ! -f "$SRCDIR/UnityEngine.dll" ]; | ||
then | ||
if [ "$TRAVIS_SECURE_ENV_VARS" = "false" ]; then | ||
# this should only happen for pull requests | ||
echo "Unable to build as the env vars have not been set. Can't decrypt the zip." | ||
exit 0; # can't decide if this should error | ||
fi | ||
|
||
if [[ ! -f dlls.zip ]]; then | ||
echo "Need to get dependency .dll's" | ||
wget -O dlls.zip "https://www.dropbox.com/s/kyv25p3qn166nzp/dlls.zip?dl=1" | ||
fi | ||
|
||
if [ -z "$ZIPPASSWORD" ]; then | ||
if [ "$TRAVIS" = "true" ]; then | ||
echo "Password not set, on travis and DLL's missing, can't build"; | ||
exit 1; | ||
else | ||
echo "Password required to decrypt the zip"; | ||
unzip dlls.zip -d src/RemoteTech2/ # this will prompt for a password | ||
fi | ||
else | ||
unzip -P "$ZIPPASSWORD" dlls.zip -d src/RemoteTech2/ | ||
fi | ||
|
||
rm -f dlls.zip | ||
fi | ||
|
||
cd src/RemoteTech2 && xbuild | ||
|
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
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
Oops, something went wrong.