From 6188633a260ff9bea73931c675cf8c46de8b3849 Mon Sep 17 00:00:00 2001 From: Ed Tan Date: Mon, 13 Sep 2021 15:40:18 -0400 Subject: [PATCH 1/4] [DEVOPS-18953] Add Amazon Linux 2 python build This modifies the action to look in this repo for Amazon Linux 2 python builds. It also changes the version-manifests.json lookup to occur in this repo. --- src/install-python.ts | 4 ++-- src/versions-manifest.json | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 src/versions-manifest.json diff --git a/src/install-python.ts b/src/install-python.ts index 526e7d59d..22ee2df02 100644 --- a/src/install-python.ts +++ b/src/install-python.ts @@ -7,8 +7,8 @@ import {IS_WINDOWS, IS_LINUX} from './utils'; const TOKEN = core.getInput('token'); const AUTH = !TOKEN || isGhes() ? undefined : `token ${TOKEN}`; -const MANIFEST_REPO_OWNER = 'actions'; -const MANIFEST_REPO_NAME = 'python-versions'; +const MANIFEST_REPO_OWNER = 'caseware'; +const MANIFEST_REPO_NAME = 'setup-python'; const MANIFEST_REPO_BRANCH = 'main'; export const MANIFEST_URL = `https://raw.githubusercontent.com/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}/${MANIFEST_REPO_BRANCH}/versions-manifest.json`; diff --git a/src/versions-manifest.json b/src/versions-manifest.json new file mode 100644 index 000000000..cc7de6821 --- /dev/null +++ b/src/versions-manifest.json @@ -0,0 +1,16 @@ +[ + { + "version": "3.9.6", + "stable": true, + "release_url": "https://github.com/caseware/setup-python/releases/tag/3.0.0", + "files": [ + { + "filename": "python-3.9.6-linux-amzn-linux-2-x64.tar.gz", + "arch": "x64", + "platform": "linux", + "platform_version": "amzn-linux-2", + "download_url": "https://github.com/caseware/setup-python/releases/download/3.0.0/python-3.9.6-amzn-linux-2-x64.tar.gz" + } + ] + } +] \ No newline at end of file From d315720f72ec04b4032a476be0e3352e6740ae7b Mon Sep 17 00:00:00 2001 From: Ed Tan Date: Mon, 13 Sep 2021 15:48:32 -0400 Subject: [PATCH 2/4] Move versions-manifest.json to repo root --- src/versions-manifest.json => versions-manifest.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename src/versions-manifest.json => versions-manifest.json (81%) diff --git a/src/versions-manifest.json b/versions-manifest.json similarity index 81% rename from src/versions-manifest.json rename to versions-manifest.json index cc7de6821..5dfc51255 100644 --- a/src/versions-manifest.json +++ b/versions-manifest.json @@ -2,15 +2,15 @@ { "version": "3.9.6", "stable": true, - "release_url": "https://github.com/caseware/setup-python/releases/tag/3.0.0", + "release_url": "https://github.com/caseware/setup-python/releases/tag/3.9.6", "files": [ { "filename": "python-3.9.6-linux-amzn-linux-2-x64.tar.gz", "arch": "x64", "platform": "linux", "platform_version": "amzn-linux-2", - "download_url": "https://github.com/caseware/setup-python/releases/download/3.0.0/python-3.9.6-amzn-linux-2-x64.tar.gz" + "download_url": "https://github.com/caseware/setup-python/releases/download/3.9.6/python-3.9.6-amzn-linux-2-x64.tar.gz" } ] } -] \ No newline at end of file +] From 222c3fd4a44aab1fec9add60a24120ff6903d42e Mon Sep 17 00:00:00 2001 From: Ed Tan Date: Mon, 13 Sep 2021 16:01:32 -0400 Subject: [PATCH 3/4] Add dist/ folder --- dist/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 16cab2276..a999f3ede 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6805,8 +6805,8 @@ const exec = __importStar(__webpack_require__(986)); const utils_1 = __webpack_require__(163); const TOKEN = core.getInput('token'); const AUTH = !TOKEN || isGhes() ? undefined : `token ${TOKEN}`; -const MANIFEST_REPO_OWNER = 'actions'; -const MANIFEST_REPO_NAME = 'python-versions'; +const MANIFEST_REPO_OWNER = 'caseware'; +const MANIFEST_REPO_NAME = 'setup-python'; const MANIFEST_REPO_BRANCH = 'main'; exports.MANIFEST_URL = `https://raw.githubusercontent.com/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}/${MANIFEST_REPO_BRANCH}/versions-manifest.json`; function findReleaseFromManifest(semanticVersionSpec, architecture) { From acaef5242531653807a96c6b11bd9281356259af Mon Sep 17 00:00:00 2001 From: Ed Tan Date: Mon, 13 Sep 2021 16:50:52 -0400 Subject: [PATCH 4/4] Change platform_version for Amazon Linux 2 I obtained this from `cat /proc/version` - it showed that Amazon Linux 2 was based off of RHEL 7.3.1-13. --- versions-manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions-manifest.json b/versions-manifest.json index 5dfc51255..4155ae0e5 100644 --- a/versions-manifest.json +++ b/versions-manifest.json @@ -8,7 +8,7 @@ "filename": "python-3.9.6-linux-amzn-linux-2-x64.tar.gz", "arch": "x64", "platform": "linux", - "platform_version": "amzn-linux-2", + "platform_version": "7.3.1", "download_url": "https://github.com/caseware/setup-python/releases/download/3.9.6/python-3.9.6-amzn-linux-2-x64.tar.gz" } ]