Skip to content

Commit

Permalink
Merge pull request #25 from jubako/small_fixes
Browse files Browse the repository at this point in the history
Series of small fixes
  • Loading branch information
mgautierfr authored Nov 23, 2024
2 parents c8b94bd + 4e70675 commit 9326a11
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true
fetch-tags: 0

- name: Fetch tags (see action/checkout#1467)
run: |
git fetch --tags
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true

- name: Publish
env:
Expand Down
23 changes: 10 additions & 13 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions src/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ pub struct Options {
/// Move to BASE_DIR before starting adding content to arx archive.
///
/// Argument `INFILES` or `STRIP_PREFIX` must be relative to `BASE_DIR`.
/// `OUTFILE` and `FILE_LIST` path is always relative to currrent directory.
/// Paths listed in `FILE_LIST` are related to `BASE_DIR`
#[arg(short = 'C', required = false, value_hint=ValueHint::DirPath)]
base_dir: Option<PathBuf>,

Expand All @@ -42,6 +44,8 @@ pub struct Options {
/// Get the list of files/directories to add from the FILE_LIST (incompatible with INFILES)
///
/// This is an option incompatible with `INFILES`.
///
/// Relative path are relative to the current working dir. `BASE_DIR` option is used after resolving relative path.
#[arg(short = 'L', long = "file-list", group = "input", verbatim_doc_comment, value_hint=ValueHint::FilePath)]
file_list: Option<PathBuf>,

Expand Down
9 changes: 7 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ use std::path::PathBuf;
use std::process::ExitCode;

const VERSION: &str = const_format::formatcp!(
"{} (git:{})",
"{}{}",
clap::crate_version!(),
git_version::git_version!(args = ["--dirty=*", "--tags", "--always"])
git_version::git_version!(
args = ["--dirty=*", "--tags", "--always"],
fallback = "",
prefix = " (git:",
suffix = ")"
)
);

#[derive(Parser)]
Expand Down

0 comments on commit 9326a11

Please sign in to comment.