Skip to content

Commit

Permalink
[feat] Travis auto update editor installers (#22)
Browse files Browse the repository at this point in the history
* Added script for committing changes in cron job.

* Updated editor-installers.json [skip ci]
  • Loading branch information
neogeek authored Nov 26, 2019
1 parent cdd55a9 commit 42b64c3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ after_success:
- node --version
- npm --version
- npm test
script:
- ./utils/commit-changes.sh
sudo: false
12 changes: 12 additions & 0 deletions data/editor-installers.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"2019.2.13f1": {
"mac": "https://download.unity3d.com/download_unity/e20f6c7e5017/MacEditorInstaller/Unity-2019.2.13f1.pkg",
"win64": "https://download.unity3d.com/download_unity/e20f6c7e5017/Windows64EditorInstaller/UnitySetup64-2019.2.13f1.exe"
},
"2019.2.12f1": {
"mac": "https://download.unity3d.com/download_unity/b1a7e1fb4fa5/MacEditorInstaller/Unity-2019.2.12f1.pkg",
"win64": "https://download.unity3d.com/download_unity/b1a7e1fb4fa5/Windows64EditorInstaller/UnitySetup64-2019.2.12f1.exe"
},
"2019.2.11f1": {
"mac": "https://download.unity3d.com/download_unity/5f859a4cfee5/MacEditorInstaller/Unity-2019.2.11f1.pkg",
"win64": "https://download.unity3d.com/download_unity/5f859a4cfee5/Windows64EditorInstaller/UnitySetup64-2019.2.11f1.exe"
Expand Down Expand Up @@ -107,6 +115,10 @@
"mac": "https://download.unity3d.com/download_unity/292b93d75a2c/MacEditorInstaller/Unity-2019.1.0f2.pkg",
"win64": "https://download.unity3d.com/download_unity/292b93d75a2c/Windows64EditorInstaller/UnitySetup64-2019.1.0f2.exe"
},
"2018.4.13f1": {
"mac": "https://download.unity3d.com/download_unity/497f083a43af/MacEditorInstaller/Unity-2018.4.13f1.pkg",
"win64": "https://download.unity3d.com/download_unity/497f083a43af/Windows64EditorInstaller/UnitySetup64-2018.4.13f1.exe"
},
"2018.4.12f1": {
"mac": "https://download.unity3d.com/download_unity/59ddc4c59b4f/MacEditorInstaller/Unity-2018.4.12f1.pkg",
"win64": "https://download.unity3d.com/download_unity/59ddc4c59b4f/Windows64EditorInstaller/UnitySetup64-2018.4.12f1.exe"
Expand Down
17 changes: 17 additions & 0 deletions utils/commit-changes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

git diff --quiet data/editor-installers.json

if [[ $? -eq 0 ]]; then

exit 0

fi

git config --global user.email "$GITHUB_USER_EMAIL"
git config --global user.name "$GITHUB_USER_NAME"

git add data/editor-installers.json
git commit -m "Updated editor-installers.json [skip ci]"
git remote add github "https://$GITHUB_TOKEN@github.com/neogeek/get-unity"
git push github HEAD:"$TRAVIS_BRANCH"

0 comments on commit 42b64c3

Please sign in to comment.