lmake_version_from_date

Crates.iolmake_version_from_date
lib.rslmake_version_from_date
version0.3.41
sourcesrc
created_at2020-04-29 06:47:02.526443
updated_at2021-08-14 12:40:30.498055
descriptionIn Cargo.toml and service_worker.js writes the version as the date.
homepage
repositoryhttps://github.com/LucianoBestia/lmake
max_upload_size
id235240
size30,412
bestia.dev (bestia-dev)

documentation

README

lmake_version_from_date

­čö┤OBSOLETE, ­čö┤DEPRECATED, ­čö┤DEFUNCT!
It was replaced by the crate cargo-auto



\

version: 0.3.37 date: 2020-05-21 authors: Luciano Bestia
In cargo.toml and service_worker.js writes the version as the date.

Lines in Rust code Lines in Doc comments Lines in Comments Lines in examples Lines in tests

In cargo.toml writes the version as the date yyyy.mmdd.HHMM ex. 2019.1221.2359.
For non-library projects, the semver specification is not really useful.
Having the version as the date is just fine for executables and much more human readable.
The util exe must be executed in the root project folder where is the cargo.toml.

service_worker.js

Inside the PWA service worker javascript file is also needed to change the version.
The program searches for service_worker.js and modify the version.

no need to change version if no files changed

If src/*.rs or cargo.tom. files are not changed from last compile, than no need to change version.
This happend is workspaces when one project is modified and the others are not.
I need to store the dates somewhere.
Probably the Target folder is ok. The filename will be lmakeversionfromdate.json. Warning: I don't check if the service worker has changed because it rarely does.

Install

cargo install lmake_version_from_date

Makefile.toml for cargo-make

In Makefile.toml for cargo make add a task like this:

[tasks.dev]
description = "cargo build release"
clear = true
dependencies = [
    "lmake_version_from_date",
    "build_release",
    "post_build",
]

[tasks.lmake_version_from_date]
clear = true
private = true
description = "in cargo.toml change version to today date"
script= ["lmake_version_from_date"]

cargo crev reviews and advisory

It is recommended to always use cargo-crev
to verify the trustworthiness of each of your dependencies.
Please, spread this info.
On the web use this url to read crate reviews. Example:
https://web.crev.dev/rust-reviews/crate/num-traits/

Commit count: 0

cargo fmt