From 5a6dc23524924d31ea9243a714f69a1789d2de3f Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Sat, 30 Oct 2021 01:34:37 -0500 Subject: [PATCH] Write secrets from CI environment --- src/write_version_data.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/write_version_data.py b/src/write_version_data.py index 3d12e486..a634030f 100644 --- a/src/write_version_data.py +++ b/src/write_version_data.py @@ -28,9 +28,11 @@ file2 = open("..\\scripts\\twblue.nsi", "w", encoding="utf-8") file2.write(contents) file2.close() print("done") +print("Writing keys to module...") file3 = open("appkeys.py", "w") -keys = """twitter_api_key = {} -twitter_api_secret = {} +keys = """twitter_api_key = "{}" +twitter_api_secret = "{}" """.format(os.environ.get("TWITTER_API_KEY"), os.environ.get("TWITTER_API_SECRET")) file3.write(keys) -file3.close() \ No newline at end of file +file3.close() +print("Wrote set of keys for consumer of {}".format(os.environ.get("TWITTER_API_KEY"))) \ No newline at end of file