Switch FreeBSD back to the package-based rust-analyzer.

This commit is contained in:
Tom Alexander
2024-05-05 21:05:37 -04:00
parent 5a763d422a
commit a2bdb93d5e
3 changed files with 15 additions and 2 deletions

View File

@@ -4,7 +4,15 @@
- rust-nightly
state: present
- name: Install packages
when: "rust_analyzer_version is defined and rust_analyzer_version == 'package'"
package:
name:
- rust-analyzer
state: present
- name: Create directories
when: "rust_analyzer_version is defined and rust_analyzer_version != 'package'"
file:
name: "{{ item }}"
state: directory
@@ -15,14 +23,16 @@
- "/opt/rust-analyzer"
- name: Clone rust-analyzer Source
when: "rust_analyzer_version is defined and rust_analyzer_version != 'package'"
git:
repo: "https://github.com/rust-lang/rust-analyzer.git"
dest: /opt/rust-analyzer
version: "2024-04-01"
version: "{{ rust_analyzer_version }}"
force: true
diff: false
- name: Build rust-analyzer
when: "rust_analyzer_version is defined and rust_analyzer_version != 'package'"
command: "cargo build --release"
args:
creates: "/opt/rust-analyzer/target/release/rust-analyzer"