diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d38e3af..3180683 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,16 +53,6 @@ jobs: file: Cargo.toml field: package.version - - name: Set artifact name - shell: bash - run: | - version="$(git describe --tags --match='v*.*.*' --always)" - name="zoxide-$version-${{ matrix.target }}" - echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV - - echo "version: $version" - echo "artifact: $name" - - name: Install Rust uses: actions-rs/toolchain@v1 with: @@ -125,7 +115,7 @@ jobs: *.zip - name: Create release - if: startsWith(github.event.head_commit.message, 'chore(release)') + if: ${{ github.ref == 'refs/heads/main' && startsWith(github.event.head_commit.message, 'chore(release)') }} uses: softprops/action-gh-release@v1 with: draft: true diff --git a/Cargo.lock b/Cargo.lock index e6f7bb4..18ae546 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -816,7 +816,7 @@ dependencies = [ [[package]] name = "zoxide" -version = "0.8.2" +version = "0.8.3" dependencies = [ "anyhow", "askama", diff --git a/Cargo.toml b/Cargo.toml index 144c4a2..8c9c349 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ name = "zoxide" readme = "README.md" repository = "https://github.com/ajeetdsouza/zoxide" rust-version = "1.62" -version = "0.8.2" +version = "0.8.3" [badges] maintenance = { status = "actively-developed" } diff --git a/build.rs b/build.rs index 2c1df03..36acf7c 100644 --- a/build.rs +++ b/build.rs @@ -12,9 +12,9 @@ fn main() { // Since we are generating completions in the package directory, we need to set this so that // Cargo doesn't rebuild every time. println!("cargo:rerun-if-changed=build.rs"); - println!("cargo:rerun-if-changed=src"); - println!("cargo:rerun-if-changed=templates"); - println!("cargo:rerun-if-changed=tests"); + println!("cargo:rerun-if-changed=src/"); + println!("cargo:rerun-if-changed=templates/"); + println!("cargo:rerun-if-changed=tests/"); generate_completions().unwrap(); } diff --git a/shell.nix b/shell.nix index 513a9da..3c5e68c 100644 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,6 @@ let rust = import (builtins.fetchTarball - "https://github.com/oxalica/rust-overlay/archive/8b4c5bef319198920fd03a916dd5f6600147358b.tar.gz"); + "https://github.com/oxalica/rust-overlay/archive/60c2cfaa8b90ed8cebd18b214fac8682dcf222dd.tar.gz"); pkgs = import (builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/0323e1f8bac882f19905174639a89397db1930f1.tar.gz") { overlays = [ rust ]; diff --git a/src/cmd/query.rs b/src/cmd/query.rs index f095501..7d5fc4d 100644 --- a/src/cmd/query.rs +++ b/src/cmd/query.rs @@ -53,8 +53,7 @@ impl Query { print!("{}", path); } } else if self.list { - let stdout = io::stdout(); - let handle = &mut stdout.lock(); + let handle = &mut io::stdout().lock(); while let Some(dir) = stream.next() { if self.score { writeln!(handle, "{}", dir.display_score(now))