Rename backend binary and shorten V_INFO

This commit is contained in:
NGnius (Graham) 2023-02-23 21:07:17 -05:00
parent fb577620dd
commit 2b94298e8c
6 changed files with 14 additions and 8 deletions

2
backend/Cargo.lock generated
View file

@ -825,7 +825,7 @@ dependencies = [
]
[[package]]
name = "powertools-rs"
name = "powertools"
version = "1.2.0-beta2"
dependencies = [
"async-trait",

View file

@ -1,5 +1,5 @@
[package]
name = "powertools-rs"
name = "powertools"
version = "1.2.0-beta2"
edition = "2021"
authors = ["NGnius (Graham) <ngniusness@gmail.com>"]

View file

@ -8,7 +8,7 @@ cargo --version
echo "--- Building plugin backend ---"
cargo build --profile docker
mkdir -p out
cp target/release/powertools-rs out/backend
cp target/release/powertools out/backend
echo " --- Cleaning up ---"
# remove root-owned target folder

View file

@ -5,6 +5,6 @@ cargo build --target x86_64-unknown-linux-musl
#cross build --release
mkdir -p ../bin
#cp ./target/x86_64-unknown-linux-musl/release/powertools-rs ../bin/backend
cp ./target/x86_64-unknown-linux-musl/debug/powertools-rs ../bin/backend
#cp ./target/release/powertools-rs ../bin/backend
#cp ./target/x86_64-unknown-linux-musl/release/powertools ../bin/backend
cp ./target/x86_64-unknown-linux-musl/debug/powertools ../bin/backend
#cp ./target/release/powertools ../bin/backend

View file

@ -73,7 +73,13 @@ fn main() -> Result<(), ()> {
let instance = Instance::new(PORT)
.register("V_INFO", |_: Vec<Primitive>| {
vec![format!("{} v{}", PACKAGE_NAME, PACKAGE_VERSION).into()]
#[cfg(debug_assertions)]
{vec![format!("v{}-dbg", PACKAGE_VERSION).into()]}
#[cfg(not(debug_assertions))]
{vec![format!("v{}-rls", PACKAGE_VERSION).into()]}
})
.register("NAME", |_: Vec<Primitive>| {
vec![PACKAGE_NAME.into()]
})
.register("LOG", api::general::log_it())
// battery API functions

View file

@ -290,7 +290,7 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({}) => {
export default definePlugin((serverApi: ServerAPI) => {
return {
title: <div className={staticClasses.Title}>PowerTools 300</div>,
title: <div className={staticClasses.Title}>I'm a tool</div>,
content: <Content serverAPI={serverApi} />,
icon: <GiDrill />,
onDismount() {