llm-ls/xtask/src/main.rs
Luc Georges f5e6911932
feat: add CI for release (#8)
* feat: add release CI

* debug: disable `aarch64-unknown-linux-gnu` & add missing `pkgconfig`

* fix: add `g++` & `pkg-config`

* fix: install libssl-dev on ubuntu

* fix: add sudo in specific case

* fix: remove ssl dependency

* feat: update Cargo.lock

* fix: use gcc-multilib

* fix: disable aarch64-linux for now

* fix: disable problematic platforms

* fix: comment out `aarch64-pc-windows-msvc`

* fix: set allow deadcode for `Document.language_id`

* fix: set valid release tag
2023-09-05 13:32:35 +02:00

45 lines
914 B
Rust

//! See <https://github.com/matklad/cargo-xtask/>.
//!
//! This binary defines various auxiliary build commands, which are not
//! expressible with just `cargo`.
//!
//! This binary is integrated into the `cargo` command line by using an alias in
//! `.cargo/config`.
#![warn(
rust_2018_idioms,
unused_lifetimes,
semicolon_in_expressions_from_macros
)]
mod flags;
mod dist;
use std::{
env,
path::{Path, PathBuf},
};
use xshell::Shell;
fn main() -> anyhow::Result<()> {
let flags = flags::Xtask::from_env_or_exit();
let sh = &Shell::new()?;
sh.change_dir(project_root());
match flags.subcommand {
flags::XtaskCmd::Dist(cmd) => cmd.run(sh),
}
}
fn project_root() -> PathBuf {
Path::new(
&env::var("CARGO_MANIFEST_DIR").unwrap_or_else(|_| env!("CARGO_MANIFEST_DIR").to_owned()),
)
.ancestors()
.nth(1)
.unwrap()
.to_path_buf()
}