-
Notifications
You must be signed in to change notification settings - Fork 819
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
Théo Penavaire
authored
Aug 18, 2021
1 parent
b6cf854
commit a8abe4c
Showing
4 changed files
with
89 additions
and
37 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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[version] | ||
repoconfig=5 | ||
repoconfig=7 | ||
minimum-unity-meta=47 | ||
|
||
[format] | ||
path-ignore=<<EOT | ||
|
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,40 +1,42 @@ | ||
# Documentation: https://internaldocs.hq.unity3d.com/unity-meta/ | ||
|
||
formatting: | ||
name: Formatting | ||
agent: | ||
type: Unity::VM | ||
image: package-ci/ubuntu:v1.3.1-719011 | ||
flavor: b1.small | ||
commands: | ||
- "echo -e \"[extensions]\nlargefiles=\n\" > ~/.hgrc" | ||
- hg clone -u stable http://hg-mirror-slo.hq.unity3d.com/unity-extra/unity-meta ~/unity-meta | ||
- perl ~/unity-meta/Tools/Format/format.pl --reporoot $(pwd) --preview . | ||
- cat ./format.patch | ||
- perl ~/unity-meta/Tools/Format/format.pl --reporoot $(pwd) --dry-run . # Run a 2nd time to actually "fail" the job if there are formatting diffs (--preview always exits with 0) | ||
timeout: 1 | ||
triggers: | ||
expression: pull_request.target eq "master" | ||
artifacts: | ||
diff: | ||
paths: | ||
- format.patch | ||
name: Formatting | ||
agent: | ||
type: Unity::VM | ||
image: package-ci/ubuntu:v1.3.1-719011 | ||
flavor: b1.small | ||
commands: | ||
- "echo -e \"[extensions]\nlargefiles=\n\" > ~/.hgrc" | ||
- hg clone -u beta http://hg-mirror-slo.hq.unity3d.com/unity-extra/unity-meta ~/unity-meta | ||
- perl ~/unity-meta/Tools/Format/format.pl --nobackups . | ||
- git diff --output ./format.patch | ||
- cat ./format.patch | ||
- | # Checking if there is a diff, to fail the job if yes (-s check means does the file contain something) | ||
if [ -s format.patch ]; then exit 1; fi | ||
timeout: 1 | ||
triggers: | ||
expression: pull_request.target eq "master" | ||
artifacts: | ||
diff: | ||
paths: | ||
- format.patch | ||
|
||
formatting_apply: | ||
name: Formatting (Apply requested changes) | ||
agent: | ||
type: Unity::VM | ||
image: package-ci/ubuntu:v1.3.1-719011 | ||
flavor: b1.small | ||
commands: | ||
- git config --global user.name "[email protected]" | ||
- git config --global user.email "[email protected]" | ||
- git checkout $GIT_BRANCH | ||
- git pull origin $GIT_BRANCH # In case the job was not run on the latest commit, attempt to get it. There may be situations with merge conflicts, in that case wait for everyone to push their changes and then only run the formatting job on HEAD. | ||
- "echo -e \"[extensions]\nlargefiles=\n\" > ~/.hgrc" | ||
- hg clone -u stable http://hg-mirror-slo.hq.unity3d.com/unity-extra/unity-meta ~/unity-meta | ||
- perl ~/unity-meta/Tools/Format/format.pl --reporoot $(pwd) --nobackups . | ||
- git add . | ||
- git commit -m "Apply formatting changes" | ||
- git push --set-upstream origin $GIT_BRANCH | ||
timeout: 1 | ||
name: Formatting (Apply requested changes) | ||
agent: | ||
type: Unity::VM | ||
image: package-ci/ubuntu:v1.3.1-719011 | ||
flavor: b1.small | ||
commands: | ||
- git config --global user.name "[email protected]" | ||
- git config --global user.email "[email protected]" | ||
- git checkout $GIT_BRANCH | ||
- git pull origin $GIT_BRANCH # In case the job was not run on the latest commit, attempt to get it. There may be situations with merge conflicts, in that case wait for everyone to push their changes and then only run the formatting job on HEAD. | ||
- "echo -e \"[extensions]\nlargefiles=\n\" > ~/.hgrc" | ||
- hg clone -u beta http://hg-mirror-slo.hq.unity3d.com/unity-extra/unity-meta ~/unity-meta | ||
- perl ~/unity-meta/Tools/Format/format.pl --nobackups . | ||
- git add . | ||
- git commit -m "Apply formatting changes" | ||
- git push --set-upstream origin $GIT_BRANCH | ||
timeout: 1 |
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