mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Deindent
This commit is contained in:
parent
5ccb03cda0
commit
583ab957b8
1 changed files with 17 additions and 9 deletions
|
@ -1,8 +1,9 @@
|
||||||
# coding: utf8
|
# coding: utf8
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
import taskcluster
|
import taskcluster
|
||||||
|
|
||||||
|
|
||||||
|
@ -111,14 +112,17 @@ def create_task(name, command, image, artifacts=None, dependencies=None, env=Non
|
||||||
"command": [
|
"command": [
|
||||||
"/bin/bash",
|
"/bin/bash",
|
||||||
"--login",
|
"--login",
|
||||||
|
"-x",
|
||||||
|
"-e",
|
||||||
"-c",
|
"-c",
|
||||||
|
deindent(
|
||||||
"""
|
"""
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
git clone $GITHUB_EVENT_CLONE_URL repo
|
git clone $GITHUB_EVENT_CLONE_URL repo
|
||||||
cd repo
|
cd repo
|
||||||
git checkout $GITHUB_EVENT_COMMIT_SHA
|
git checkout $GITHUB_EVENT_COMMIT_SHA
|
||||||
""" + command
|
"""
|
||||||
|
+ command
|
||||||
|
)
|
||||||
],
|
],
|
||||||
"env": env,
|
"env": env,
|
||||||
"artifacts": {
|
"artifacts": {
|
||||||
|
@ -137,5 +141,9 @@ def create_task(name, command, image, artifacts=None, dependencies=None, env=Non
|
||||||
return task_id
|
return task_id
|
||||||
|
|
||||||
|
|
||||||
|
def deindent(string):
|
||||||
|
return re.sub("\n +", "\n ", string)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue