Skip to content

Commit

Permalink
fix: use correct source dir for building
Browse files Browse the repository at this point in the history
  • Loading branch information
m42e committed Jul 11, 2024
1 parent 829a1f3 commit 673c65f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zsh-histdb-skim"
version = "0.9.5"
version = "0.9.6"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ fn main() -> Result<()> {
}(args);

if query == "--version" {
println!("v0.9.5");
println!("v0.9.6");
std::process::exit(1);
}

Expand Down
5 changes: 3 additions & 2 deletions zsh-histdb-skim.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ XDG_BIN_PATH=${XDG_DATA_HOME:-$HOME/.local/share}/zsh-histdb-skim/
BIN_DIR=${HISTDB_SKIM_PATH:-${XDG_BIN_PATH}}
BIN_PATH=${BIN_DIR}/zsh-histdb-skim

HISTB_SKIM_VERSION="v0.9.5"
HISTB_SKIM_VERSION="v0.9.6"

histdb-skim-get-os(){
UNAME_STR=`uname -a`
Expand Down Expand Up @@ -37,7 +37,8 @@ histdb-skim-ensure () {
if [[ ! -f ${BIN_PATH} || $(${BIN_PATH} --version) != ${HISTB_SKIM_VERSION} ]]; then
if command -v cargo &> /dev/null; then
echo "cargo is available, starting Rust release build"
SCRIPT_DIR=$(cd "$(dirname "$0:A")" && pwd)
SOURCE="${(%):-%x}"
SCRIPT_DIR=$(cd "$(dirname "$SOURCE")" && pwd)
(cd ${SCRIPT_DIR};\
cargo build --release --manifest-path "${SCRIPT_DIR}/Cargo.toml" && \
cp "${SCRIPT_DIR}/target/release/zsh-histdb-skim" ${BIN_PATH})
Expand Down

0 comments on commit 673c65f

Please sign in to comment.