Skip to content

Commit 93f75d8

Browse files
committed
minor fixups
1 parent 68c6ff1 commit 93f75d8

File tree

4 files changed

+45
-40
lines changed

4 files changed

+45
-40
lines changed

.github/workflows/release+build+publish.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ jobs:
7878
echo "::notice title=Needs Build::${NEEDS_BUILD}"
7979
echo "needs_build=${NEEDS_BUILD}" >> "$GITHUB_OUTPUT"
8080
81-
# TODO:
82-
# build on some runners, e.g. ubuntu-latest, macos-latest, windows-latest
83-
# publish to crates.io
84-
# publish binaries as assets to github release
85-
8681
# Note that we just use the rust tooling that exists by default on the runners.
8782
# See https://github.com/actions/runner-images?tab=readme-ov-file#available-images
8883
build:
@@ -119,9 +114,8 @@ jobs:
119114
path: |
120115
~/.cargo/registry
121116
target/
122-
key: nextver-${{ matrix.triple }}-${{needs.tag.outputs.name}}-${{ hashFiles('**/Cargo.lock') }}
117+
key: nextver-${{ matrix.triple }}-${{needs.tag.outputs.name}}
123118
restore-keys: |
124-
nextver-${{ matrix.triple }}-${{needs.tag.outputs.name}}-
125119
nextver-${{ matrix.triple }}-
126120
nextver-
127121
@@ -230,7 +224,10 @@ jobs:
230224
- name: Publish to crates.io
231225
run: |
232226
cd source
233-
cargo publish
227+
228+
# pass --no-verify because we've already run tests and built binaries.
229+
# its good, i promise.
230+
cargo publish --no-verify
234231
env:
235232
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
236233

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "nextver"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
authors = ["Tim Martin <tim@tim.direct>"]
55
readme = "README.md"
66
repository = "https://github.com/t-mart/nextver"

README.md

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
A library for parsing and incrementing arbitrarily-formatted versions.
44

5-
Instead of conforming to a specific versioning scheme, this library allows you to define your
6-
own version format, parse version strings against it, and increment versions according to
7-
semantic and/or calendar rules.
5+
Instead of conforming to a specific versioning scheme, this library allows you
6+
to define your own version format, parse version strings against it, and
7+
increment versions according to semantic and/or calendar rules.
88

99
Also comes with a [CLI](#cli).
1010

@@ -13,7 +13,8 @@ This an abridged version of the documentation. For the full documentation, see
1313

1414
## Example
1515

16-
*Below, the text in `<` and `>` brackets is a specifier. See what they mean [here](#table).*
16+
*Below, the text in `<` and `>` brackets is a specifier. See what they mean
17+
[here](#table).*
1718

1819
Quickly get a next version:
1920

@@ -32,34 +33,39 @@ assert_eq!(next, "1.3.0");
3233

3334
nextver is built around three main concepts: Schemes, formats, and versions.
3435

35-
- **Schemes** dictate the kinds of values allowed in versions and the rules for incrementing
36-
them. (See the [table](#table) below.) They are modeled by the [`Scheme`] trait and
37-
implemented by the the following structs:
36+
- **Schemes** dictate the kinds of values allowed in versions and the rules for
37+
incrementing them. (See the [table](#table) below.) They are modeled by the
38+
[`Scheme`] trait and implemented by the the following structs:
3839

39-
- [`Sem`]: A semantic versioning scheme. It is similar to [SemVer](https://semver.org/).
40+
- [`Sem`]: A semantic versioning scheme. It is similar to
41+
[SemVer](https://semver.org/).
4042
- [`CalSem`]: A calendar-semantic versioning scheme. It is similar to
41-
[CalVer](https://calver.org/), but with an explicitly-required semantic part(s).
42-
- [`Cal`]: A calendar versioning scheme. Its like [`CalSem`] but without semantic specifiers.
43-
(This scheme is less useful in practice because there is no way to increment a version twice
44-
within the same period of its least significant specifier.)
45-
46-
- **Formats** define the structure of a version string. They are modeled by the [`Format`]
47-
struct. They contains a sequence of *specifier* and *literal text* tokens. For example,
48-
`<MAJOR>.<MINOR>.<PATCH>` is a format string that can be turned into a [`Format`] object.
49-
50-
- **Versions** are like Formats, but with actual values instead of specifiers. They represent a
51-
a point in a project's development. These are modeled by the [`Version`] struct. They can be
52-
incremented to new versions and compared amongst each other.
43+
[CalVer](https://calver.org/), but with an explicitly-required semantic
44+
part(s).
45+
- [`Cal`]: A calendar versioning scheme. Its like [`CalSem`] but without
46+
semantic specifiers. (This scheme is less useful in practice because there
47+
is no way to increment a version twice within the same period of its least
48+
significant specifier.)
49+
50+
- **Formats** define the structure of a version string. They are modeled by the
51+
[`Format`] struct. They contains a sequence of *specifier* and *literal text*
52+
tokens. For example, `<MAJOR>.<MINOR>.<PATCH>` is a format string that can be
53+
turned into a [`Format`] object.
54+
55+
- **Versions** are like Formats, but with actual values instead of specifiers.
56+
They represent a a point in a project's development. These are modeled by the
57+
[`Version`] struct. They can be incremented to new versions and compared
58+
amongst each other.
5359

5460
## Format String Syntax
5561

56-
Use any sequence of *specifiers* (listed below) and *literal text* in a format string. Specifiers
57-
are bracketed with `<` and `>`.
62+
Use any sequence of *specifiers* (listed below) and *literal text* in a format
63+
string. Specifiers are bracketed with `<` and `>`.
5864

5965
### Table
6066

61-
In the "Example" column below, we reference a major of `1`, minor of `2`, patch of `3` and a
62-
date of `2001-02-03` (which is in the 4th week).
67+
In the "Example" column below, we reference a major of `1`, minor of `2`, patch
68+
of `3` and a date of `2001-02-03` (which is in the 4th week).
6369

6470
| Specifier | Example | Sem | CalSem | Cal | Parse Width | Format Width | Description |
6571
|---|---|---|---|---|---|---|---|
@@ -80,8 +86,8 @@ Specifiers are case-sensitive. For example, `<major>` is not a valid specifier.
8086

8187
## CLI
8288

83-
This crate provides a CLI that can be used to do some API functions straight from the command
84-
line.
89+
This crate provides a CLI that can be used to do some API functions straight
90+
from the command line.
8591

8692
### Installation
8793

@@ -99,9 +105,11 @@ nextver --help
99105

100106
To:
101107

102-
- create a new git tag,
108+
- create and push a new git tag,
103109
- create a new GitHub release with binaries attached, and
104-
- publish a new version to <https://crates.io> (and update docs on <https://docs.rs>)
110+
- publish a new version to <https://crates.io> (and update docs on
111+
<https://docs.rs>)
105112

106-
simply push a commit to the `master` branch with an updated version number in `Cargo.toml`. The workflow
107-
file at `.github/workflows/release.yml` will take care of the rest.
113+
simply push a commit to the `master` branch with an updated version number in
114+
`Cargo.toml`. The workflow file at `.github/workflows/release+build+publish.yml`
115+
will take care of the rest. Make sure to pull afterwards.

0 commit comments

Comments
 (0)