[F] Maybe this can work
This commit is contained in:
+1
-1
@@ -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"
|
||||
|
||||
Executable
+23
@@ -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!"
|
||||
Reference in New Issue
Block a user