Fixes#745
This adds a script to create a release. Running it will create two
commits that would appear like this in `git log --oneline`:
67b5fff (master) release: reset released flag
0b808f3 (tag: v1.8.1) release: v1.8.1
100d2f3 docs: last change before release
It also re-creates the `version.nix` file, which is used by the flake
to determine the final version the disko CLI will print.
If `disko --version` is run from exactly the commit tagged `v1.8.1`, it
will print `1.8.1`. If it is run from any commit past that (like
master), it will print `1.8.1-67b5fff`, and if it is run from a local
folder with uncommitted changes, it will print `1.8.1-67b5fff-dirty`.
Consider this flake:
{
description = "Helper for reproducing a disko-related problem";
inputs = {
disko.url = "github:nix-community/disko/b1d6bed240abef5f5373e88fc7909f493013e557";
nixpkgs.follows = "disko/nixpkgs";
};
outputs =
{
self,
disko,
nixpkgs,
}:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages."${system}";
in
{
packages."${system}".default =
pkgs.resholve.writeScript "disko-install-binlore-test"
{
inputs = [ disko.packages."${system}".default ];
interpreter = "${pkgs.lib.getExe pkgs.bash}";
}
''
disko --help
disko-install --help
'';
};
}
That flake will fail to build because resholve thinks that disko and
disko-install might be able to execute their arguments. This commit
fixes that problem.
Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
When running disko-install from a distribution that is not NixOS,
the nixos-install command was failing due to nixos-install not
being in PATH.
Fix the error by adding the nixos-install-tools package to the list
of packages passed to lib.makeBinPath.