mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
parent
898560d675
commit
e67dc85a4f
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -25,6 +25,8 @@ jobs:
|
|||
PATTERNS: projects/**/package.yml
|
||||
- name: process diff
|
||||
id: process-diff
|
||||
env:
|
||||
PKGX_PANTRY_PATH: ${{ github.workspace }}
|
||||
run: |
|
||||
if [ -n "${{ steps.get-diff.outputs.diff }}" ]; then
|
||||
for x in ${{ steps.get-diff.outputs.diff }}; do
|
||||
|
|
15
projects/crates.io/wordl/add-version.patch
Normal file
15
projects/crates.io/wordl/add-version.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
diff --git a/src/main.rs b/src/main.rs
|
||||
index f21aebd..f7f8410 100644
|
||||
--- a/src/main.rs
|
||||
+++ b/src/main.rs
|
||||
@@ -15,6 +15,10 @@ pub mod wordle;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> color_eyre::Result<()> {
|
||||
+ if std::env::args().any(|arg| arg == "--version" || arg == "-V") {
|
||||
+ println!("wordl {}", env!("CARGO_PKG_VERSION"));
|
||||
+ return Ok(());
|
||||
+ }
|
||||
color_eyre::install()?;
|
||||
let result = run().await;
|
||||
result?;
|
21
projects/crates.io/wordl/package.yml
Normal file
21
projects/crates.io/wordl/package.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
distributable:
|
||||
url: https://github.com/palerdot/wordl-rs/archive/refs/tags/v{{ version }}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
provides:
|
||||
- bin/wordl
|
||||
|
||||
versions:
|
||||
github: palerdot/wordl-rs
|
||||
strip: /v/
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
rust-lang.org: '>=1.56'
|
||||
rust-lang.org/cargo: '*'
|
||||
script:
|
||||
# add --version/-V to allow a simple test
|
||||
- patch -p1 < props/add-version.patch
|
||||
- cargo install --locked --path . --root {{prefix}}
|
||||
|
||||
test: test "$(wordl --version)" = "wordl {{version}}"
|
Loading…
Reference in a new issue