chore(docker): fix versioning
This commit is contained in:
parent
b7b5a24be6
commit
bbe49cb2ff
@ -106,7 +106,7 @@
|
|||||||
${pkgs.skopeo}/bin/skopeo ''${@} --insecure-policy copy docker-archive://${pkgs.uniworxDemoDocker} ''${target}
|
${pkgs.skopeo}/bin/skopeo ''${@} --insecure-policy copy docker-archive://${pkgs.uniworxDemoDocker} ''${target}
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
packages = haskellFlake.packages // { inherit (pkgs) uniworx-node-dependencies uniworx-well-known uniworx-frontend; inherit (pkgs.uniworx.stack-nix.passthru) calculateMaterializedSha; };
|
packages = haskellFlake.packages // { inherit (pkgs) uniworx-node-dependencies uniworx-well-known uniworx-frontend uniworxDemoDocker; inherit (pkgs.uniworx.stack-nix.passthru) calculateMaterializedSha; };
|
||||||
apps = haskellFlake.apps // { push-uniworx-demo-docker = flake-utils.lib.mkApp { drv = pushUniworxDemoDocker; }; };
|
apps = haskellFlake.apps // { push-uniworx-demo-docker = flake-utils.lib.mkApp { drv = pushUniworxDemoDocker; }; };
|
||||||
inherit (haskellFlake) checks;
|
inherit (haskellFlake) checks;
|
||||||
|
|
||||||
|
|||||||
@ -3,8 +3,9 @@
|
|||||||
name = "uniworx-demo";
|
name = "uniworx-demo";
|
||||||
tag =
|
tag =
|
||||||
let
|
let
|
||||||
inherit (builtins.fromTOML (prev.lib.readFile ./version.toml)) semver;
|
versionJSON = builtins.fromJSON (prev.lib.readFile ./version.json);
|
||||||
hash = prev.lib.substring 0 8 (self.rev or prev.lib.removePrefix "sha256-" self.narHash);
|
semver = versionJSON.version;
|
||||||
|
hash = prev.lib.substring 0 8 (self.rev or (prev.lib.removePrefix "sha256-" self.narHash));
|
||||||
in "${semver}+${hash}";
|
in "${semver}+${hash}";
|
||||||
created =
|
created =
|
||||||
let
|
let
|
||||||
|
|||||||
3
nix/docker-demo/version.json
Normal file
3
nix/docker-demo/version.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0"
|
||||||
|
}
|
||||||
@ -1,3 +0,0 @@
|
|||||||
# TODO: Bump version (https://semver.org) on every semantic change
|
|
||||||
# docker-demo should always use major version zero
|
|
||||||
semver = "0.2.0"
|
|
||||||
Reference in New Issue
Block a user