mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
chore: appending _ to modules
This commit is contained in:
parent
06efb53f35
commit
e7e0cbac9a
8 changed files with 18 additions and 15 deletions
8
.github/workflows/build.yaml
vendored
8
.github/workflows/build.yaml
vendored
|
|
@ -88,8 +88,8 @@ jobs:
|
||||||
run: >
|
run: >
|
||||||
7z a pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.zip
|
7z a pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.zip
|
||||||
./target/${{ matrix.target }}/release/pay-respects.exe
|
./target/${{ matrix.target }}/release/pay-respects.exe
|
||||||
./target/${{ matrix.target }}/release/pay-respects-module-runtime-rules.exe
|
./target/${{ matrix.target }}/release/_pay-respects-module-runtime-rules.exe
|
||||||
./target/${{ matrix.target }}/release/pay-respects-fallback-request-ai.exe
|
./target/${{ matrix.target }}/release/_pay-respects-fallback-request-ai.exe
|
||||||
|
|
||||||
- name: zipping files (unix)
|
- name: zipping files (unix)
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
|
|
@ -97,8 +97,8 @@ jobs:
|
||||||
tar -czf pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
|
tar -czf pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
|
||||||
-C target/${{ matrix.target }}/release
|
-C target/${{ matrix.target }}/release
|
||||||
pay-respects
|
pay-respects
|
||||||
pay-respects-module-runtime-rules
|
_pay-respects-module-runtime-rules
|
||||||
pay-respects-fallback-request-ai
|
_pay-respects-fallback-request-ai
|
||||||
|
|
||||||
- name: uploading to release
|
- name: uploading to release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
|
|
|
||||||
4
Cargo.lock
generated
4
Cargo.lock
generated
|
|
@ -481,7 +481,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pay-respects-module-request-ai"
|
name = "pay-respects-module-request-ai"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"colored",
|
"colored",
|
||||||
"curl",
|
"curl",
|
||||||
|
|
@ -494,7 +494,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pay-respects-module-runtime-rules"
|
name = "pay-respects-module-runtime-rules"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pay-respects-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pay-respects-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex-lite",
|
"regex-lite",
|
||||||
|
|
|
||||||
|
|
@ -60,9 +60,9 @@ impl Data {
|
||||||
let mut modules = vec![];
|
let mut modules = vec![];
|
||||||
let mut fallbacks = vec![];
|
let mut fallbacks = vec![];
|
||||||
for exe in path_executables {
|
for exe in path_executables {
|
||||||
if exe.starts_with("pay-respects-module-") {
|
if exe.starts_with("_pay-respects-module-") {
|
||||||
modules.push(exe.to_string());
|
modules.push(exe.to_string());
|
||||||
} else if exe.starts_with("pay-respects-fallback-") {
|
} else if exe.starts_with("_pay-respects-fallback-") {
|
||||||
fallbacks.push(exe.to_string());
|
fallbacks.push(exe.to_string());
|
||||||
} else {
|
} else {
|
||||||
executables.push(exe.to_string());
|
executables.push(exe.to_string());
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,6 @@ pub fn suggest_candidates(data: &mut Data) {
|
||||||
}
|
}
|
||||||
for fallback in fallbacks {
|
for fallback in fallbacks {
|
||||||
let candidates = module_output(data, fallback);
|
let candidates = module_output(data, fallback);
|
||||||
eprintln!("fallback: {candidates:?}");
|
|
||||||
if candidates.is_some() {
|
if candidates.is_some() {
|
||||||
add_candidates_no_dup(command, &mut suggest_candidates, &candidates.unwrap());
|
add_candidates_no_dup(command, &mut suggest_candidates, &candidates.unwrap());
|
||||||
data.candidates = suggest_candidates;
|
data.candidates = suggest_candidates;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ main() {
|
||||||
echo "Detected architecture: ${_arch}"
|
echo "Detected architecture: ${_arch}"
|
||||||
|
|
||||||
local _bin_name="pay-respects"
|
local _bin_name="pay-respects"
|
||||||
local _modules="pay-respects-module-runtime-rules pay-respects-fallback-request-ai"
|
local _modules="_pay-respects-module-runtime-rules _pay-respects-fallback-request-ai"
|
||||||
case "${_arch}" in
|
case "${_arch}" in
|
||||||
*windows*)
|
*windows*)
|
||||||
_bin_name="${_bin_name}.exe"
|
_bin_name="${_bin_name}.exe"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pay-respects-module-request-ai"
|
name = "pay-respects-module-request-ai"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
description = "AI request module for the pay-respects CLI tool"
|
description = "AI request module for the pay-respects CLI tool"
|
||||||
|
|
@ -26,5 +26,5 @@ curl = { version = "0.4", optional = true }
|
||||||
libcurl = ["dep:curl"]
|
libcurl = ["dep:curl"]
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "pay-respects-fallback-request-ai"
|
name = "_pay-respects-fallback-request-ai"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pay-respects-module-runtime-rules"
|
name = "pay-respects-module-runtime-rules"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# for crates.io
|
# for crates.io
|
||||||
|
|
@ -18,3 +18,7 @@ toml = { version = "0.8" }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
pay-respects-utils = "0.1.0"
|
pay-respects-utils = "0.1.0"
|
||||||
# pay-respects-utils = { path = "../utils" }
|
# pay-respects-utils = { path = "../utils" }
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "_pay-respects-module-runtime-rules"
|
||||||
|
path = "src/main.rs"
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,10 @@
|
||||||
There are 2 types of modules:
|
There are 2 types of modules:
|
||||||
|
|
||||||
- **Standard module**: Will always run to retrieve suggestions
|
- **Standard module**: Will always run to retrieve suggestions
|
||||||
- Naming convention: `pay-respects-module-<your module name>`
|
- Naming convention: `_pay-respects-module-<your module name>`
|
||||||
- **Fallback module**: Will only be run if no previous suggestion were found
|
- **Fallback module**: Will only be run if no previous suggestion were found
|
||||||
- **CAUTION**: Will immediately return if a suggestion is obtained, and there is no guaranteed the modules are executed in a specific order.
|
- **CAUTION**: Will immediately return if a suggestion is obtained, and there is no guaranteed the modules are executed in a specific order.
|
||||||
- Naming convention: `pay-respects-fallback-<your module name>`
|
- Naming convention: `_pay-respects-fallback-<your module name>`
|
||||||
|
|
||||||
When running your module, you will get the following environment variables:
|
When running your module, you will get the following environment variables:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue