1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2025-07-30 12:07:46 +00:00

feat: dynamic versioning

This commit is contained in:
Kevin Amado 2022-01-27 23:54:17 -05:00
parent d2709594da
commit c671ef15fc
No known key found for this signature in database
GPG key ID: FFF341057F503148
3 changed files with 10 additions and 5 deletions

6
Cargo.lock generated
View file

@ -4,7 +4,7 @@ version = 3
[[package]]
name = "alejandra"
version = "0.1.0"
version = "0.0.0"
dependencies = [
"clap",
"indoc",
@ -195,9 +195,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
version = "0.2.114"
version = "0.2.115"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0005d08a8f7b65fb8073cb697aa0b12b631ed251ce73d862ce50eeb52ce3b50"
checksum = "0a8d982fa7a96a000f6ec4cfe966de9703eccde29750df2bb8949da91b0e818d"
[[package]]
name = "memchr"

View file

@ -15,4 +15,4 @@
edition = "2021"
name = "alejandra"
repository = "https://github.com/kamadorueda/alejandra"
version = "0.1.0"
version = "0.0.0"

View file

@ -24,7 +24,12 @@
nixpkgs.rustPlatform.buildRustPackage
{
pname = cargoToml.package.name;
version = inputs.self.sourceInfo.rev;
version =
let
commit = inputs.self.shortRev or "dirty";
date = inputs.self.lastModifiedDate or inputs.self.lastModified or "19700101";
in
"${ builtins.substring 0 8 date }_${ commit }";
src = inputs.self.sourceInfo;
cargoLock.lockFile = ./Cargo.lock;
NIX_BUILD_CORES = 0;