|
7 | 7 | import tempfile |
8 | 8 | from pathlib import Path |
9 | 9 |
|
10 | | -UV_VERSION = "0.8.4" |
11 | | -PNPM_VERSION = "10.14.0" |
12 | | -COPIER_VERSION = "9.9.1" |
13 | | -COPIER_TEMPLATE_EXTENSIONS_VERSION = "0.3.2" |
| 10 | +UV_VERSION = "0.8.15" |
| 11 | +PNPM_VERSION = "10.15.1" |
| 12 | +COPIER_VERSION = "9.10.1" |
| 13 | +COPIER_TEMPLATE_EXTENSIONS_VERSION = "0.3.3" |
14 | 14 | PRE_COMMIT_VERSION = "4.3.0" |
15 | 15 | GITHUB_WINDOWS_RUNNER_BIN_PATH = r"C:\Users\runneradmin\.local\bin" |
16 | 16 | INSTALL_SSM_PLUGIN_BY_DEFAULT = False |
|
31 | 31 | "--no-node", action="store_true", default=False, help="Do not process any environments using node package managers" |
32 | 32 | ) |
33 | 33 | _ = parser.add_argument( |
34 | | - "--install-ssm-plugin", |
| 34 | + "--skip-installing-ssm-plugin", |
35 | 35 | action="store_true", |
36 | | - default=INSTALL_SSM_PLUGIN_BY_DEFAULT, |
37 | | - help="Install the SSM plugin for AWS CLI", |
| 36 | + default=False, |
| 37 | + help="Skip installing the SSM plugin for AWS CLI", |
38 | 38 | ) |
39 | 39 |
|
40 | 40 |
|
@@ -117,26 +117,43 @@ def main(): |
117 | 117 | else [cmd] |
118 | 118 | ) |
119 | 119 | _ = subprocess.run(cmd, shell=True, check=True) |
120 | | - if args.install_ssm_plugin: |
121 | | - if is_windows: |
122 | | - raise NotImplementedError("SSM plugin installation is not implemented for Windows") |
| 120 | + if INSTALL_SSM_PLUGIN_BY_DEFAULT and not args.skip_installing_ssm_plugin: |
123 | 121 | with tempfile.TemporaryDirectory() as tmp_dir: |
124 | | - local_package_path = Path(tmp_dir) / "session-manager-plugin.deb" |
125 | | - # Based on https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-debian-and-ubuntu.html |
126 | | - # no specific reason for that version, just pinning it for best practice |
127 | | - _ = subprocess.run( |
128 | | - [ |
129 | | - "curl", |
130 | | - "https://s3.amazonaws.com/session-manager-downloads/plugin/1.2.707.0/ubuntu_64bit/session-manager-plugin.deb", |
131 | | - "-o", |
132 | | - f"{local_package_path}", |
133 | | - ], |
134 | | - check=True, |
135 | | - ) |
136 | | - _ = subprocess.run( |
137 | | - ["sudo", "dpkg", "-i", str(local_package_path)], |
138 | | - check=True, |
139 | | - ) |
| 122 | + if is_windows: |
| 123 | + local_package_path = Path(tmp_dir) / "SessionManagerPluginSetup.exe" |
| 124 | + # Based on https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-windows.html |
| 125 | + # no specific reason for that version, just pinning it for best practice |
| 126 | + _ = subprocess.run( |
| 127 | + [ |
| 128 | + "curl", |
| 129 | + "https://s3.amazonaws.com/session-manager-downloads/plugin/1.2.707.0/windows/SessionManagerPluginSetup.exe", |
| 130 | + "-o", |
| 131 | + f"{local_package_path}", |
| 132 | + ], |
| 133 | + check=True, |
| 134 | + ) |
| 135 | + _ = subprocess.run( |
| 136 | + [str(local_package_path), "/quiet"], |
| 137 | + check=True, |
| 138 | + ) |
| 139 | + else: |
| 140 | + local_package_path = Path(tmp_dir) / "session-manager-plugin.deb" |
| 141 | + # Based on https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-debian-and-ubuntu.html |
| 142 | + # no specific reason for that version, just pinning it for best practice |
| 143 | + _ = subprocess.run( |
| 144 | + [ |
| 145 | + "curl", |
| 146 | + "https://s3.amazonaws.com/session-manager-downloads/plugin/1.2.707.0/ubuntu_64bit/session-manager-plugin.deb", |
| 147 | + "-o", |
| 148 | + f"{local_package_path}", |
| 149 | + ], |
| 150 | + check=True, |
| 151 | + ) |
| 152 | + _ = subprocess.run( |
| 153 | + ["sudo", "dpkg", "-i", str(local_package_path)], |
| 154 | + check=True, |
| 155 | + ) |
| 156 | + print("SSM Plugin Manager Version: ") |
140 | 157 | _ = subprocess.run( |
141 | 158 | ["session-manager-plugin", "--version"], |
142 | 159 | check=True, |
|
0 commit comments