mirror of
https://github.com/hykilpikonna/hyfetch.git
synced 2026-09-25 18:05:29 -05:00
[F] Packaging - Bundle data assets and neofetch script into crate archive (#544)
This commit is contained in:
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -417,6 +417,12 @@ jobs:
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Prepare assets for crate packaging
|
||||
run: |
|
||||
mkdir -p crates/hyfetch/hyfetch
|
||||
cp -r hyfetch/data crates/hyfetch/hyfetch/
|
||||
cp neofetch crates/hyfetch/
|
||||
|
||||
- name: Authenticate with crates.io
|
||||
uses: rust-lang/crates-io-auth-action@v1
|
||||
id: auth
|
||||
@@ -424,4 +430,4 @@ jobs:
|
||||
- name: Publish crate
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
|
||||
run: cargo publish -p hyfetch
|
||||
run: cargo publish -p hyfetch --allow-dirty
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -132,3 +132,7 @@ __pycache__
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
|
||||
# Cargo packaging temporary assets
|
||||
crates/hyfetch/hyfetch
|
||||
crates/hyfetch/neofetch
|
||||
|
||||
@@ -9,6 +9,14 @@ repository = { workspace = true }
|
||||
license = { workspace = true }
|
||||
readme = { workspace = true }
|
||||
default-run = "hyfetch"
|
||||
include = [
|
||||
"src/**/*",
|
||||
"build.rs",
|
||||
"Cargo.toml",
|
||||
"README.md",
|
||||
"hyfetch/**/*",
|
||||
"neofetch",
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
aho-corasick = { workspace = true, features = ["perf-literal", "std"] }
|
||||
|
||||
@@ -51,6 +51,7 @@ fn main() -> Result<()> {
|
||||
let data_dir = anything_that_exist(&[
|
||||
&dir.join("hyfetch/data"),
|
||||
&dir.join("../../hyfetch/data"),
|
||||
&dir.join("data"),
|
||||
]).context("couldn't find hyfetch/data")?;
|
||||
|
||||
let dst_root = o.join("hyfetch");
|
||||
|
||||
Reference in New Issue
Block a user