mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 04:41:35 +00:00
svars-write
This commit is contained in:
13
src/travis/svars-write.py
Normal file
13
src/travis/svars-write.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import sys
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
cfg = json.load(sys.stdin)
|
||||||
|
cfg['client_secret'] = os.getenv('client_secret')
|
||||||
|
jid = os.getenv('jid')
|
||||||
|
cfg['refresh_token'] = os.getenv('refresh_%s' % jid)
|
||||||
|
gampath = os.getenv('gampath')
|
||||||
|
out_file = os.path.join(gampath, 'oauth2.txt')
|
||||||
|
with open(out_file, 'w') as f:
|
||||||
|
json.dump(cfg, f)
|
||||||
|
print(f'Wrote {out_file} with {len(cfg["client_secret"]} char client secret and {len(cfg["refresh_token"])} char refresh token.')
|
||||||
Reference in New Issue
Block a user