diff --git a/Cargo.toml b/Cargo.toml index 55515294..48e48e65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["crates/*"] [workspace.package] -version = "2.0.0-rc2" +version = "2.0.0-rc3" authors = ["Azalea Gui "] edition = "2021" rust-version = "1.75.0" diff --git a/tools/deploy-crate.sh b/tools/deploy-crate.sh new file mode 100755 index 00000000..cfa6e753 --- /dev/null +++ b/tools/deploy-crate.sh @@ -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!" \ No newline at end of file