Skip to content

Commit

Permalink
fix: rename rtx to mise (#407)
Browse files Browse the repository at this point in the history
rtx has been renamed to mise as of release
[v2024.1.0](https://github.com/jdx/mise/releases/tag/v2024.1.0).
  • Loading branch information
akikanellis authored Jan 6, 2024
1 parent 0ca7104 commit 903b5cc
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fully automated, seamless CI/CD pipeline.
Install the following software

- [just](https://github.com/casey/just)
- [rtx](https://github.com/jdx/rtx)
- [mise](https://github.com/jdx/mise)
- [![VirtualBox](docs/images/virtualbox.svg) VirtualBox](https://www.virtualbox.org)

### Usage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
- name: Install rtx plugins
- name: Install mise plugins
ansible.builtin.import_role:
name: common
tasks_from: rtx
tasks_from: mise
vars:
rtx_plugins:
mise_plugins:
- name: nodejs
- name: python

Expand Down
17 changes: 17 additions & 0 deletions ansible/roles/all/tasks/install-mise.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: Install mise
ansible.builtin.get_url:
url:
"https://github.com/jdx/mise/releases/download/\
{{ mise_version }}/\
mise-\
{{ mise_version }}-\
{{ ansible_system | lower }}-{{ mise_architecture }}"
dest: /home/aki/.local/bin/mise
owner: aki
group: aki
mode: 0700
register: result
retries: 10
delay: 2
until: result is success
17 changes: 0 additions & 17 deletions ansible/roles/all/tasks/install-rtx.yml

This file was deleted.

8 changes: 4 additions & 4 deletions ansible/roles/all/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
- name: Setup ZSH
ansible.builtin.import_tasks: setup-zsh.yml

- name: Install rtx
ansible.builtin.import_tasks: install-rtx.yml
- name: Install mise
ansible.builtin.import_tasks: install-mise.yml

- name: Install rtx utilities
ansible.builtin.import_tasks: install-rtx-utilities.yml
- name: Install mise utilities
ansible.builtin.import_tasks: install-mise-utilities.yml
8 changes: 4 additions & 4 deletions ansible/roles/all/templates/users/aki/zsh/functions.zsh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ function update() {
echo "brew updated!"
fi

if command_exists rtx; then
echo "Updating rtx..."
rtx upgrade --yes
echo "rtx updated!"
if command_exists mise; then
echo "Updating mise..."
mise upgrade --yes
echo "mise updated!"
fi

if command_exists npm; then
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/all/templates/users/aki/zsh/zshrc.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ source ~/.zsh/options.zsh
source ~/.zsh/starship.zsh
source ~/.zsh/zoxide.zsh

# Created from `echo 'eval "$(rtx activate zsh)"' >> "${ZDOTDIR-$HOME}/.zshrc"`
# See: https://rtx.jdx.dev/getting-started.html#zsh
eval "$(rtx activate zsh)"
# Created from `echo 'eval "$(mise activate zsh)"' >> "${ZDOTDIR-$HOME}/.zshrc"`
# See: https://mise.jdx.dev/getting-started.html#zsh
eval "$(mise activate zsh)"

source ~/.zsh/extra-zshrc-config.zsh
10 changes: 5 additions & 5 deletions ansible/roles/all/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ architecture_to_lazygit_architecture:
lazygit_architecture: >-
{{ architecture_to_lazygit_architecture[ansible_architecture] }}
# renovate: datasource=github-releases depName=jdx/rtx
rtx_version: v2024.1.7
architecture_to_rtx_architecture:
# renovate: datasource=github-releases depName=jdx/mise
mise_version: v2024.1.7
architecture_to_mise_architecture:
x86_64: x64
armv7l: armv7
rtx_architecture: >-
{{ architecture_to_rtx_architecture[ansible_architecture] }}
mise_architecture: >-
{{ architecture_to_mise_architecture[ansible_architecture] }}
# renovate: datasource=github-releases depName=ajeetdsouza/zoxide
zoxide_version: v0.9.2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
- name: Set plugin names
ansible.builtin.set_fact:
rtx_plugins_names: "{{ rtx_plugins | map(attribute='name') | list }}"
mise_plugins_names: "{{ mise_plugins | map(attribute='name') | list }}"

- name: Install "nodejs" rtx plugin dependencies
- name: Install "nodejs" mise plugin dependencies
ansible.builtin.package:
name:
- dirmngr
- gpg
when: "'nodejs' in rtx_plugins_names"
when: "'nodejs' in mise_plugins_names"

# Needed by the python plugin due to pyenv
# See: https://github.com/pyenv/pyenv/wiki#suggested-build-environment
- name: Install "python" rtx plugin dependencies
- name: Install "python" mise plugin dependencies
ansible.builtin.package:
name:
- libbz2-dev
Expand All @@ -27,36 +27,36 @@
- tk-dev
- xz-utils
- zlib1g-dev
when: "'python' in rtx_plugins_names"
when: "'python' in mise_plugins_names"

- name: Install "aki" user rtx plugins
- name: Install "aki" user mise plugins
become_user: aki
ansible.builtin.command:
cmd: >-
zsh -c "
rtx use --global --yes
mise use --global --yes
{{
rtx_plugins |
mise_plugins |
map(attribute='name') |
zip(rtx_plugins | map(attribute='version') | map('default', 'latest')) |
zip(mise_plugins | map(attribute='version') | map('default', 'latest')) |
map('join', '@') |
join(' ')
}}"
register: rtx_install
register: mise_install
retries: 10
delay: 2
until: rtx_install is success
changed_when: "'installed' in rtx_install.stdout"
until: mise_install is success
changed_when: "'installed' in mise_install.stdout"

- name: Discover "aki" user pip executable
become_user: aki
ansible.builtin.command:
cmd: zsh -c "rtx which pip"
cmd: zsh -c "mise which pip"
register: which_pip
changed_when: false
when: "'python' in rtx_plugins_names"
when: "'python' in mise_plugins_names"

- name: Set pip executable
ansible.builtin.set_fact:
pip_executable: "{{ which_pip.stdout }}"
when: "'python' in rtx_plugins_names"
when: "'python' in mise_plugins_names"
2 changes: 1 addition & 1 deletion ansible/roles/common/tasks/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ansible.builtin.command:
cmd: >-
zsh -c
"rtx exec --
"mise exec --
npm install --global {{ package_names | join(' ') }}"
register: npm_install
retries: 10
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/workstations/tasks/install-dev-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
ansible.builtin.package:
name: vagrant

- name: Install "aki" user rtx dev tools
- name: Install "aki" user mise dev tools
ansible.builtin.import_role:
name: common
tasks_from: rtx
tasks_from: mise
vars:
rtx_plugins:
mise_plugins:
- name: java
version: temurin

Expand Down
2 changes: 1 addition & 1 deletion docs/DEVELOPERS_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test this project.
Install the following software

- [just](https://github.com/casey/just)
- [rtx](https://github.com/jdx/rtx)
- [mise](https://github.com/jdx/mise)
- [![VirtualBox](images/virtualbox.svg) VirtualBox](https://www.virtualbox.org)

## Useful Commands
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ install: install-tools install-dependencies

# Install tools
install-tools:
rtx install
mise install

# Install dependencies
install-dependencies:
Expand Down

0 comments on commit 903b5cc

Please sign in to comment.