Update to lsp protocol v3
This commit is contained in:
3
concourse/.vscode/settings.json
vendored
Normal file
3
concourse/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"python.linting.pylintEnabled": false
|
||||
}
|
||||
25
concourse/set-pipeline.py
Executable file
25
concourse/set-pipeline.py
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
|
||||
def replace(infile, outfile, findword, replaceword):
|
||||
with open(infile, "rt") as fin:
|
||||
with open(outfile, "wt") as fout:
|
||||
for line in fin:
|
||||
fout.write(line.replace(findword, replaceword))
|
||||
|
||||
branch = os.popen("git rev-parse --abbrev-ref HEAD").read().strip()
|
||||
|
||||
if branch == 'master':
|
||||
os.system('''fly -t tools set-pipeline --load-vars-from ${HOME}/.sts4-concourse-credentials.yml
|
||||
--var "branch=${branch}"
|
||||
-p sts4-${branch} -c pipeline.yml''')
|
||||
else:
|
||||
fname = "pipeline-"+branch+".yml"
|
||||
replace("pipeline.yml", "pipeline-"+branch+".yml", "snapshot", branch)
|
||||
with open(fname, 'r') as fin:
|
||||
print fin.read()
|
||||
cmd = ('fly -t tools set-pipeline --load-vars-from ${HOME}/.sts4-concourse-credentials.yml ' +
|
||||
'--var "branch=' + branch + '" ' + '-p sts4-' +branch+' -c '+fname)
|
||||
print cmd
|
||||
os.system(cmd)
|
||||
Reference in New Issue
Block a user