Skip to content

[feat] Travis auto update editor installers #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"