Skip to content

Commit

Permalink
Merge branch 'release/0.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
xen0n committed Dec 9, 2017
2 parents 0ced918 + 210c341 commit 531a999
Show file tree
Hide file tree
Showing 25 changed files with 335 additions and 254 deletions.
26 changes: 12 additions & 14 deletions .travis.yml
Expand Up @@ -12,6 +12,14 @@ env:

matrix:
include:
# OSX
# HACK: open-source jobs on OSX take VERY long time just to start, so just
# get up earlier like when you're attending a live or so
- env: TARGET=i686-apple-darwin
os: osx
- env: TARGET=x86_64-apple-darwin
os: osx

# Android
- env: TARGET=aarch64-linux-android DISABLE_TESTS=1
- env: TARGET=arm-linux-androideabi DISABLE_TESTS=1
Expand All @@ -36,19 +44,15 @@ matrix:
- env: TARGET=x86_64-unknown-linux-gnu
- env: TARGET=x86_64-unknown-linux-musl

# OSX
- env: TARGET=i686-apple-darwin
os: osx
- env: TARGET=x86_64-apple-darwin
os: osx

# *BSD
- env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1
- env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1
- env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1

# Windows
- env: TARGET=x86_64-pc-windows-gnu
# netbsd currently doesn't build (because of nix-0.9.0)
env: # important: https://docs.travis-ci.com/user/customizing-the-build/#rows-that-are-allowed-to-fail
allow_failures:
- env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1

before_install:
- set -e
Expand Down Expand Up @@ -83,12 +87,6 @@ before_cache:
# Travis can't cache files that are not readable by "others"
- chmod -R a+r $HOME/.cargo

branches:
only:
# release tags
- /^\d+\.\d+\.\d+.*$/
- master

notifications:
email:
on_success: never
57 changes: 10 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions Cargo.toml
@@ -1,23 +1,24 @@
[package]
name = "autojump"
version = "0.2.2"
version = "0.3.0"
authors = ["Wang Xuerui <git@xen0n.name>"]
description = "A Rust port and drop-in replacement of autojump"
repository = "https://github.com/xen0n/autojump-rs"
readme = "README.md"
license = "GPL-3.0+"
include = ["src/**/*.rs", "Cargo.toml", "build.rs"]
build = "build.rs"
include = ["src/**/*.rs", "Cargo.toml"]


[features]
default = []
nightly = []


[dependencies]
atomicwrites = "0.1.3"
# atomicwrites = "0.1.3"
atomicwrites = { git = "https://github.com/xen0n/rust-atomicwrites", branch = "feature/update-nix" }
docopt = "0.8.1"
regex = "0.2"
serde = "1.0.19"
serde_derive = "1.0.19"
strsim = "0.6"


[build-dependencies]
walkdir = "2.0.1"
19 changes: 12 additions & 7 deletions README.md
@@ -1,9 +1,11 @@
# autojump-rs [![Crates.io version](https://img.shields.io/crates/v/autojump.svg)][cratesio] [![Crates.io downloads](https://img.shields.io/crates/dv/autojump.svg)][cratesio] [![Crates.io license](https://img.shields.io/crates/l/autojump.svg)](LICENSE)
# autojump-rs [![Crates.io version](https://img.shields.io/crates/v/autojump.svg)][cratesio] [![Crates.io downloads](https://img.shields.io/crates/dv/autojump.svg)][cratesio] [![Crates.io license](https://img.shields.io/crates/l/autojump.svg)](LICENSE) [![Travis build status](https://img.shields.io/travis/xen0n/autojump-rs/develop.svg?label=travis)][travis] [![AppVeyor build status](https://img.shields.io/appveyor/ci/xen0n/autojump-rs/develop.svg?logo=appveyor)][appveyor]

A port of the wildly popular helper application [`autojump`][aj] to Rust.

[aj]: https://github.com/wting/autojump
[cratesio]: https://crates.io/crates/autojump
[travis]: https://travis-ci.org/xen0n/autojump-rs
[appveyor]: https://ci.appveyor.com/project/xen0n/autojump-rs


## License
Expand Down Expand Up @@ -122,11 +124,14 @@ implementation. These are:
distance][jaro] is computed between every filename and the last part of
query needles respectively, and results are filtered based on that.

* `jc` doesn't work correctly at the moment.
* `jc` may jump outside current directory.

Exact reason may be different filtering logic involved, but I'm not very
sure about this one. I only use plain `j` mostly, so if you're heavily
reliant on `jc` and its friends please open an issue!
sure about this one. The behavior is also observed on original `autojump`,
but the frequency seems to be lower, and both implementations actually
don't check if the target is below current directory. However I only use
plain `j` mostly, so if you're heavily reliant on `jc` and its friends
please open an issue!


[rust-argparse]: https://github.com/tailhook/rust-argparse
Expand All @@ -139,9 +144,9 @@ implementation. These are:
## Future plans

Now that platform support is mostly considered okay, next steps would be
more refactoring and bug fixing. I once considered Git commit ids in
release artifact "cool", but I no longer want that now, so that would be
gone in the next release. And the `jc` bug should also be tackled.
more refactoring and bug fixing. The `jc` behavior differences are observed
on original `autojump` too, in that you could jump outside `$(pwd)`, but the
actual directory jumped to is different; this needs further investigation.
Hell I even want to write a `fasd` backend too, but I don't presently have
*that* much free time. Anyway, contributions and bug reports are welcome!

Expand Down
14 changes: 3 additions & 11 deletions appveyor.yml
Expand Up @@ -26,14 +26,12 @@ install:
test_script:
# we don't run the "test phase" when doing deploys
- if [%APPVEYOR_REPO_TAG%]==[false] (
cargo build --target %TARGET% &&
cargo build --target %TARGET% --release &&
cargo test --target %TARGET% &&
cargo test --target %TARGET% --release
cargo build --features nightly --target %TARGET% &&
cargo test --target %TARGET%
)

before_deploy:
- cargo rustc --target %TARGET% --release --bin autojump -- -C lto
- cargo rustc --features nightly --target %TARGET% --release --bin autojump -- -C lto
- ps: ci\before_deploy.ps1

deploy:
Expand All @@ -50,12 +48,6 @@ cache:
- C:\Users\appveyor\.cargo\registry
- target

branches:
only:
# Release tags
- /^\d+\.\d+\.\d+.*$/
- master

notifications:
- provider: Email
on_build_success: false
Expand Down
61 changes: 0 additions & 61 deletions build.rs

This file was deleted.

2 changes: 1 addition & 1 deletion ci/before_deploy.sh
Expand Up @@ -17,7 +17,7 @@ main() {

test -f Cargo.lock || cargo generate-lockfile

cross rustc --bin autojump --target $TARGET --release -- -C lto
cross rustc --features nightly --bin autojump --target $TARGET --release -- -C lto

cp target/$TARGET/release/autojump $stage/

Expand Down
6 changes: 2 additions & 4 deletions ci/script.sh
Expand Up @@ -3,15 +3,13 @@
set -ex

main() {
cross build --target $TARGET
cross build --target $TARGET --release
cross build --features nightly --target $TARGET

if [ ! -z $DISABLE_TESTS ]; then
return
fi

cross test --target $TARGET
cross test --target $TARGET --release
cross test --features nightly --target $TARGET
}

# we don't run the "test phase" when doing deploys
Expand Down

0 comments on commit 531a999

Please sign in to comment.