mirror of
https://github.com/servo/servo.git
synced 2025-07-03 21:43:41 +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
|
||||
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import taskcluster
|
||||
|
||||
|
||||
|
@ -111,14 +112,17 @@ def create_task(name, command, image, artifacts=None, dependencies=None, env=Non
|
|||
"command": [
|
||||
"/bin/bash",
|
||||
"--login",
|
||||
"-x",
|
||||
"-e",
|
||||
"-c",
|
||||
"""
|
||||
set -e
|
||||
set -x
|
||||
git clone $GITHUB_EVENT_CLONE_URL repo
|
||||
cd repo
|
||||
git checkout $GITHUB_EVENT_COMMIT_SHA
|
||||
""" + command
|
||||
deindent(
|
||||
"""
|
||||
git clone $GITHUB_EVENT_CLONE_URL repo
|
||||
cd repo
|
||||
git checkout $GITHUB_EVENT_COMMIT_SHA
|
||||
"""
|
||||
+ command
|
||||
)
|
||||
],
|
||||
"env": env,
|
||||
"artifacts": {
|
||||
|
@ -137,5 +141,9 @@ def create_task(name, command, image, artifacts=None, dependencies=None, env=Non
|
|||
return task_id
|
||||
|
||||
|
||||
def deindent(string):
|
||||
return re.sub("\n +", "\n ", string)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue