1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 04:27:45 +00:00

Merge pull request #1604 from rivy/fix.versioning

Fix versioning
This commit is contained in:
Sylvestre Ledru 2020-10-12 09:22:31 +02:00 committed by GitHub
commit dd583030b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View file

@ -23,6 +23,7 @@
import glob
import os
import re
# -- General configuration ------------------------------------------------
@ -55,11 +56,14 @@ author = 'uutils developers'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# * take version from project "Cargo.toml"
version_file = open(os.path.join("..","Cargo.toml"), "r")
version_file_content = version_file.read()
v = re.search("^\s*version\s*=\s*\"([0-9.]+)\"", version_file_content, re.IGNORECASE | re.MULTILINE)
# The short X.Y version.
version = '0.0.1'
version = v.groups()[0]
# The full version, including alpha/beta/rc tags.
release = '0.0.1'
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -179,6 +183,3 @@ texinfo_documents = [
author, 'uutils', 'A cross-platform reimplementation of GNU coreutils in Rust.',
'Miscellaneous'),
]

View file

@ -11,7 +11,7 @@ mod memo;
mod tokenize;
static NAME: &str = "printf";
static VERSION: &str = "0.0.1";
static VERSION: &str = env!("CARGO_PKG_VERSION");
static SHORT_USAGE: &str = "printf: usage: printf [-v var] format [arguments]";
static LONGHELP_LEAD: &str = "printf