mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-22 12:55:13 +00:00
Add cargo-deb metadata (#409)
This commit is contained in:
parent
10c11310ed
commit
7c7a2a0a3c
@ -1,2 +1,7 @@
|
|||||||
[alias]
|
[alias]
|
||||||
xtask = "run --package xtask --"
|
xtask = "run --package xtask --"
|
||||||
|
|
||||||
|
# On Windows MSVC, statically link the C runtime so that the resulting EXE does
|
||||||
|
# not depend on the vcruntime DLL.
|
||||||
|
[target.'cfg(all(windows, target_env = "msvc"))']
|
||||||
|
rustflags = ["-C", "target-feature=+crt-static"]
|
||||||
|
27
.github/workflows/release.yml
vendored
27
.github/workflows/release.yml
vendored
@ -2,7 +2,6 @@ name: release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
@ -21,12 +20,14 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: x86_64-unknown-linux-musl
|
target: x86_64-unknown-linux-musl
|
||||||
|
deb: true
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: arm-unknown-linux-musleabihf
|
target: arm-unknown-linux-musleabihf
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: armv7-unknown-linux-musleabihf
|
target: armv7-unknown-linux-musleabihf
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: aarch64-unknown-linux-musl
|
target: aarch64-unknown-linux-musl
|
||||||
|
deb: true
|
||||||
|
|
||||||
- os: macos-11
|
- os: macos-11
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
@ -71,6 +72,20 @@ jobs:
|
|||||||
args: --release --locked --target=${{ matrix.target }} --color=always --verbose
|
args: --release --locked --target=${{ matrix.target }} --color=always --verbose
|
||||||
use-cross: ${{ runner.os == 'Linux' }}
|
use-cross: ${{ runner.os == 'Linux' }}
|
||||||
|
|
||||||
|
- name: Install cargo-deb
|
||||||
|
if: ${{ matrix.deb == true }}
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: install
|
||||||
|
args: cargo-deb --locked
|
||||||
|
|
||||||
|
- name: Build deb
|
||||||
|
if: ${{ matrix.deb == true }}
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: deb
|
||||||
|
args: --no-build --no-strip --output=. --target=${{ matrix.target }}
|
||||||
|
|
||||||
- name: Package (*nix)
|
- name: Package (*nix)
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
run: >
|
run: >
|
||||||
@ -94,14 +109,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ matrix.target }}
|
name: ${{ matrix.target }}
|
||||||
path: |
|
path: |
|
||||||
*.zip
|
*.deb
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
|
*.zip
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.event.head_commit.message, 'chore(release)')
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
files: |
|
files: |
|
||||||
*.zip
|
*.deb
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
|
*.zip
|
||||||
|
name: ${{ github.event.head_commit.id }}
|
||||||
|
tag_name: ""
|
||||||
|
52
Cargo.toml
52
Cargo.toml
@ -3,9 +3,11 @@ authors = ["Ajeet D'Souza <98ajeet@gmail.com>"]
|
|||||||
categories = ["command-line-utilities", "filesystem"]
|
categories = ["command-line-utilities", "filesystem"]
|
||||||
description = "A smarter cd command for your terminal"
|
description = "A smarter cd command for your terminal"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
homepage = "https://github.com/ajeetdsouza/zoxide"
|
||||||
keywords = ["cli"]
|
keywords = ["cli"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
name = "zoxide"
|
name = "zoxide"
|
||||||
|
readme = "README.md"
|
||||||
repository = "https://github.com/ajeetdsouza/zoxide"
|
repository = "https://github.com/ajeetdsouza/zoxide"
|
||||||
rust-version = "1.59"
|
rust-version = "1.59"
|
||||||
version = "0.8.1"
|
version = "0.8.1"
|
||||||
@ -60,3 +62,53 @@ codegen-units = 1
|
|||||||
debug = 0
|
debug = 0
|
||||||
lto = true
|
lto = true
|
||||||
strip = true
|
strip = true
|
||||||
|
|
||||||
|
[package.metadata.deb]
|
||||||
|
assets = [
|
||||||
|
[
|
||||||
|
"target/release/zoxide",
|
||||||
|
"usr/local/bin/",
|
||||||
|
"755",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"contrib/completions/zoxide.bash",
|
||||||
|
"usr/share/bash-completion/completions/zoxide",
|
||||||
|
"644",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"contrib/completions/zoxide.fish",
|
||||||
|
"usr/share/fish/completions/",
|
||||||
|
"664",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"contrib/completions/_zoxide",
|
||||||
|
"usr/share/zsh/vendor-completions/",
|
||||||
|
"644",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"man/man1/*",
|
||||||
|
"usr/share/man/man1/",
|
||||||
|
"644",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"README.md",
|
||||||
|
"usr/share/doc/zoxide/",
|
||||||
|
"644",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"CHANGELOG.md",
|
||||||
|
"usr/share/doc/zoxide/",
|
||||||
|
"644",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"LICENSE",
|
||||||
|
"usr/share/doc/zoxide/",
|
||||||
|
"644",
|
||||||
|
],
|
||||||
|
]
|
||||||
|
extended-description = """\
|
||||||
|
zoxide is a smarter cd command, inspired by z and autojump. It remembers which \
|
||||||
|
directories you use most frequently, so you can "jump" to them in just a few \
|
||||||
|
keystrokes."""
|
||||||
|
priority = "optional"
|
||||||
|
section = "admin"
|
||||||
|
@ -113,14 +113,14 @@ end
|
|||||||
{%- match cmd %}
|
{%- match cmd %}
|
||||||
{%- when Some with (cmd) %}
|
{%- when Some with (cmd) %}
|
||||||
|
|
||||||
abbr --erase {{cmd}}
|
abbr --erase {{cmd}} &>/dev/null
|
||||||
complete -c {{cmd}} -e
|
complete -c {{cmd}} -e
|
||||||
function {{cmd}}
|
function {{cmd}}
|
||||||
__zoxide_z $argv
|
__zoxide_z $argv
|
||||||
end
|
end
|
||||||
complete -c {{cmd}} -f -a '(__zoxide_z_complete)'
|
complete -c {{cmd}} -f -a '(__zoxide_z_complete)'
|
||||||
|
|
||||||
abbr --erase {{cmd}}i
|
abbr --erase {{cmd}}i &>/dev/null
|
||||||
complete -c {{cmd}}i -e
|
complete -c {{cmd}}i -e
|
||||||
function {{cmd}}i
|
function {{cmd}}i
|
||||||
__zoxide_zi $argv
|
__zoxide_zi $argv
|
||||||
|
Loading…
Reference in New Issue
Block a user