From 70c088f374d71422b30dbf5de8d38e1e1bb67b9f Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 31 Dec 2022 20:04:34 -0500 Subject: [PATCH] bump version --- CHANGELOG.md | 22 ++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 57 +++++++++++++++++++++++++++------------------------- src/cli.rs | 2 +- 5 files changed, 55 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71eea7a..533cb45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## v0.2.0 - 2023-01-01 + +### Fixes + +- `fetchFromGitHub` now correctly sets `githubBase` when domain is not github.com + +### Features + +- `--arg` to pass extra rguments to the fetcher +- `--json` to output in json format +- `--list-fetchers` to list all available fetchers +- `--list-possible-fetchers` to list all fetchers that can be generated without `--fetcher` +- Support for the following fetchers + - `fetchBitBucket` () + - `fetchFromGitea` (and ) + - `fetchFromGitiles` (and ) + - `fetchFromRepoOrCz` () +- Man page +- Shell completions +- Nix flake +- Colored output + ## v0.1.1 - 2022-12-29 First release diff --git a/Cargo.lock b/Cargo.lock index c7abe1c..154906a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -235,7 +235,7 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "nurl" -version = "0.1.1" +version = "0.2.0" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 100931f..0fbb4e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nurl" -version = "0.1.1" +version = "0.2.0" authors = ["figsoda "] edition = "2021" description = "Generate Nix fetcher calls from repository URLs" diff --git a/README.md b/README.md index 7e21586..d89f19c 100644 --- a/README.md +++ b/README.md @@ -8,47 +8,50 @@ Generate Nix fetcher calls from repository URLs - -## Installation - -The latest precompiled binaries are available on [github](https://github.com/nix-community/nurl/releases/latest). - -Alternatively you can install nurl from [crates.io][crate] with cargo. - -```sh -cargo install nurl +```console +$ nurl https://github.com/nix-community/patsh v0.2.0 2>/dev/null +fetchFromGitHub { + owner = "nix-community"; + repo = "patsh"; + rev = "v0.2.0"; + hash = "sha256-7HXJspebluQeejKYmVA7sy/F3dtU1gc4eAbKiPexMMA="; +} ``` +## Supported Fetchers -## Building from source - -```sh -cargo build --release -``` - +- fetchFromBitBucket +- fetchFromGitHub +- fetchFromGitLab +- fetchFromGitea +- fetchFromGitiles +- fetchFromRepoOrCz +- fetchFromSourcehut +- fetchgit +- fetchhg (requires `--fetcher fetchhg`) ## Usage ``` -Generate Nix fetcher calls from repository URLs -https://github.com/nix-community/nurl - -Usage: nurl [OPTIONS] +Usage: nurl [OPTIONS] [URL] [REV] Arguments: - URL to the repository to be fetched - the revision or reference to be fetched + [URL] URL to the repository to be fetched + [REV] the revision or reference to be fetched Options: - -f, --fetcher specify the fetcher function instead of inferring from the URL [possible values: fetchFromGitHub, fetchFromGitLab, fetchFromSourcehut, fetchgit, fetchhg] - -i, --indent extra indentation (in number of spaces) [default: 0] - -h, --help Print help information - -V, --version Print version information + -f, --fetcher specify the fetcher function instead of inferring from the URL [possible values: fetchFromBitBucket, fetchFromGitHub, fetchFromGitLab, fetchFromGitea, fetchFromGitiles, fetchFromRepoOrCz, fetchFromSourcehut, fetchgit, fetchhg] + -i, --indent extra indentation (in number of spaces) [default: 0] + -j, --json output in json format + -a, --arg additional arguments to pass to the fetcher + -l, --list-fetchers List all available fetchers + -L, --list-possible-fetchers List all fetchers that can be generated without --fetcher + -h, --help Print help information + -V, --version Print version information ``` - ## Changelog + See [CHANGELOG.md](CHANGELOG.md) - [crate]: https://crates.io/crates/nurl diff --git a/src/cli.rs b/src/cli.rs index b5fd129..c381c7e 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -34,7 +34,7 @@ pub struct Opts { #[arg(short, long)] pub json: bool, - // additional arguments to pass to the fetcher + /// additional arguments to pass to the fetcher #[arg(short, long = "arg", num_args = 2, value_names = ["KEY", "VALUE"])] pub args: Vec,