[F] Maybe this can work
This commit is contained in:
parent
2fe4b3f287
commit
3c7c449da4
2 changed files with 24 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ resolver = "2"
|
|||
members = ["crates/*"]
|
||||
|
||||
[workspace.package]
|
||||
version = "2.0.0-rc2"
|
||||
version = "2.0.0-rc3"
|
||||
authors = ["Azalea Gui <azalea@hydev.org>"]
|
||||
edition = "2021"
|
||||
rust-version = "1.75.0"
|
||||
|
|
|
|||
23
tools/deploy-crate.sh
Executable file
23
tools/deploy-crate.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
# This script does some file path magic to make cargo publish work without having
|
||||
# to have neofetch & font logos in the cargo root.
|
||||
# ...okay basically it copies these files over before publishing.
|
||||
set -euo pipefail
|
||||
|
||||
# Get the directory of SRC root which is ../ from this script
|
||||
SRC_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
CARGO_ROOT="$SRC_ROOT/crates/hyfetch"
|
||||
|
||||
# Copy neofetch from here to cargo root
|
||||
cp "$SRC_ROOT/neofetch" "$CARGO_ROOT/"
|
||||
mkdir -p "$CARGO_ROOT/hyfetch"
|
||||
cp -r "$SRC_ROOT/hyfetch/data" "$CARGO_ROOT/hyfetch/"
|
||||
|
||||
# Build the crate
|
||||
cargo publish -p hyfetch --dry-run --allow-dirty
|
||||
|
||||
# Delete the copied files
|
||||
rm "$CARGO_ROOT/neofetch"
|
||||
rm -rf "$CARGO_ROOT/hyfetch"
|
||||
|
||||
echo "Done!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue