-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall-ci-tooling.sh.jinja
More file actions
34 lines (25 loc) · 1.65 KB
/
install-ci-tooling.sh.jinja
File metadata and controls
34 lines (25 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{% raw %}
# can pass in the full major.minor.patch version of python as an optional argument
set -ex
{% endraw %}{% if is_child_of_copier_base_template is not defined and install_aws_ssm_port_forwarding_plugin is defined and install_aws_ssm_port_forwarding_plugin is sameas(true) %}{% raw %}
# Based on https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-debian-and-ubuntu.html
# TODO: figure out how to pin this
curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" -o "/tmp/session-manager-plugin.deb"
sudo dpkg -i /tmp/session-manager-plugin.deb
session-manager-plugin --version{% endraw %}{% endif %}{% raw %}
{% endraw %}{% if template_uses_javascript is defined and template_uses_javascript is sameas(true) %}{% raw %}
npm -v
npm install -g pnpm@{% endraw %}{{ pnpm_version }}{% raw %}
pnpm -v{% endraw %}{% endif %}{% raw %}
curl -LsSf https://astral.sh/uv/{% endraw %}{{ uv_version }}{% raw %}/install.sh | sh
uv --version
# TODO: add uv autocompletion to the shell https://docs.astral.sh/uv/getting-started/installation/#shell-autocompletion
# Ensure that uv won't use the default system Python
default_version="{% endraw %}{{ python_version }}{% raw %}"
# Use the input argument if provided, otherwise use the default value
input="${1:-$default_version}"
export UV_PYTHON="$input"
export UV_PYTHON_PREFERENCE=only-system
uv tool install 'copier=={% endraw %}{{ copier_version }}{% raw %}' --with 'copier-templates-extensions=={% endraw %}{{ copier_templates_extension_version }}{% raw %}'
uv tool install 'pre-commit=={% endraw %}{{ pre_commit_version }}{% raw %}'
uv tool list{% endraw %}