Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: install short alias (fzz) #86

Merged
merged 4 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

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

11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "funzzy"
version = "1.0.1"
version = "1.1.0"
authors = ["Cristian Oliveira <me@cristianoliveira.com>"]
description = "Yet another fancy watcher inspired by entr."
license = "MIT"
Expand All @@ -17,3 +17,12 @@ glob="0.2.11"
notify-debouncer-mini = "0.3.0"
nix = "0.26.2"
#clippy = "*"

[[bin]]
name = "funzzy"
path = "src/main.rs"

# alias
[[bin]]
name = "fzz"
path = "src/main.rs"
8 changes: 5 additions & 3 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ cargo build --target $TARGET --release

ARTIFACT="funzzy-${RELEASE_TAG:?"Missing release tag"}-${TARGET}.tar.gz"

cp target/$TARGET/release/funzzy funzzy
mkdir -p pkg
cp target/$TARGET/release/funzzy pkg
cp target/$TARGET/release/fzz pkg

tar czf "$ARTIFACT" funzzy
tar czf "$ARTIFACT" pkg

# sanity check the file type
file funzzy
file pkg/funzzy
11 changes: 8 additions & 3 deletions linux-install.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
VERSION="v1.0.1"
VERSION=$(cat Cargo.toml | grep version | awk -F\" '{print $2}')

echo "Installing funzzy $VERSION"

cd /tmp

wget https://github.com/cristianoliveira/funzzy/releases/download/$VERSION/funzzy-$VERSION-x86_64-unknown-linux-gnu.tar.gz
tar -xf funzzy-$VERSION-x86_64-unknown-linux-gnu.tar.gz
sudo cp funzzy /usr/local/bin

echo "Application was installed in /usr/local/bin. To uninstall just do rm /usr/local/bin/funzzy"
sudo cp pkg/funzzy /usr/local/bin
sudo cp pkg/fzz /usr/local/bin

echo "Cli was installed in /usr/local/bin/funzzy and /usr/local/bin/fzz"
echo "To uninstall just run 'rm /usr/local/bin/funzzy' and 'rm /usr/local/bin/fzz'"
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const VERSION: &str = env!("CARGO_PKG_VERSION");
const USAGE: &str = "
Funzzy the watcher.

Alias:
fzz -> funzzy

Usage:
funzzy [options]
funzzy init
Expand Down