From 14fa7c5e3addaa535aebdeb7494c217a0d2032bc Mon Sep 17 00:00:00 2001 From: Wendi Onwuakpa Date: Fri, 8 Nov 2024 18:50:16 -0500 Subject: [PATCH] Deleted python script, moved logic to release pipeline --- setup/releaseVersionUpdate.py | 45 ----------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 setup/releaseVersionUpdate.py diff --git a/setup/releaseVersionUpdate.py b/setup/releaseVersionUpdate.py deleted file mode 100644 index 9cd2b0e09..000000000 --- a/setup/releaseVersionUpdate.py +++ /dev/null @@ -1,45 +0,0 @@ -import json -import requests -import sys -import os -from xml.dom import minidom - - -sasUrl = sys.argv[1] -releaseVersion = sys.argv[2].split(' ')[2] -print('Release Version: ' + releaseVersion) -if(len(releaseVersion)==0): - print('Incorrect Release Version') - sys.exit(1) - -# Split the SAS URL to get the container URL and SAS token -containerUrl = sasUrl.split('?')[0] -sasToken = sasUrl.split('?')[1] - -# Create a file and write the release version to it -file_name = 'latest_version.txt' -with open(file_name, 'w') as file: - file.write(releaseVersion) -print(f'Data written to {file_name}') - -# Get the full URL to upload the file -putUrl = containerUrl + '/' + file_name - -# Upload the file using a PUT request -with open(file_name, 'rb') as data: - headers = { - 'x-ms-blob-type': 'BlockBlob', - 'Content-Length': str(os.path.getsize(file_name)) - } - resp = requests.put(putUrl, data=data, headers=headers) - -# Check if the request was successful -if resp.status_code == 201: - print('File successfully uploaded') -else: - print(f"Failed to upload file: {resp.status_code}, Response: {resp.text}") - sys.exit(1) - -# Clean up the local file -os.remove(file_name) -print(f"Local file '{file_name}' deleted.") \ No newline at end of file