Move version to a JSON file so we can have release names
Change-Id: I5ff3396a302565ee5ee6c2db97e048e403779076
This commit is contained in:
parent
24057dcb6a
commit
9c77c62e73
9 changed files with 16 additions and 15 deletions
1
.version
1
.version
|
@ -1 +0,0 @@
|
|||
2.90.0
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
lib ? pkgs.lib,
|
||||
name ? "nix",
|
||||
name ? "lix",
|
||||
tag ? "latest",
|
||||
bundleNixpkgs ? true,
|
||||
channelName ? "nixpkgs",
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
# Set to true to build the release notes for the next release.
|
||||
buildUnreleasedNotes = true;
|
||||
|
||||
version = lib.fileContents ./.version + versionSuffix;
|
||||
versionSuffix =
|
||||
if officialRelease then
|
||||
""
|
||||
|
@ -149,8 +148,7 @@
|
|||
}
|
||||
);
|
||||
|
||||
binaryTarball =
|
||||
nix: pkgs: pkgs.callPackage ./nix-support/binary-tarball.nix { inherit nix version; };
|
||||
binaryTarball = nix: pkgs: pkgs.callPackage ./nix-support/binary-tarball.nix { inherit nix; };
|
||||
|
||||
overlayFor =
|
||||
getStdenv: final: prev:
|
||||
|
@ -330,10 +328,10 @@
|
|||
pkgs = nixpkgsFor.${system}.native;
|
||||
image = import ./docker.nix {
|
||||
inherit pkgs;
|
||||
tag = version;
|
||||
tag = pkgs.nix.version;
|
||||
};
|
||||
in
|
||||
pkgs.runCommand "docker-image-tarball-${version}"
|
||||
pkgs.runCommand "docker-image-tarball-${pkgs.nix.version}"
|
||||
{ meta.description = "Docker image with Lix for ${system}"; }
|
||||
''
|
||||
mkdir -p $out/nix-support
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
# in the build directory.
|
||||
|
||||
project('lix', 'cpp',
|
||||
version : run_command('bash', '-c', 'echo -n $(cat ./.version)$VERSION_SUFFIX', check : true).stdout().strip(),
|
||||
version : run_command('bash', '-c', 'echo -n $(jq -r .version < ./version.json)$VERSION_SUFFIX', check : true).stdout().strip(),
|
||||
default_options : [
|
||||
'cpp_std=c++2a',
|
||||
# TODO(Qyriad): increase the warning level
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
cacert,
|
||||
nix,
|
||||
system,
|
||||
version,
|
||||
}:
|
||||
let
|
||||
installerClosureInfo = buildPackages.closureInfo {
|
||||
|
@ -15,10 +14,10 @@ let
|
|||
|
||||
meta.description = "Distribution-independent Lix bootstrap binaries for ${system}";
|
||||
in
|
||||
buildPackages.runCommand "lix-binary-tarball-${version}" { inherit meta; } ''
|
||||
buildPackages.runCommand "lix-binary-tarball-${nix.version}" { inherit meta; } ''
|
||||
cp ${installerClosureInfo}/registration $TMPDIR/reginfo
|
||||
|
||||
dir=lix-${version}-${system}
|
||||
dir=lix-${nix.version}-${system}
|
||||
fn=$out/$dir.tar.xz
|
||||
mkdir -p $out/nix-support
|
||||
echo "file binary-dist $fn" >> $out/nix-support/hydra-build-products
|
||||
|
|
|
@ -88,7 +88,8 @@ let
|
|||
inherit (lib) fileset;
|
||||
inherit (stdenv) hostPlatform buildPlatform;
|
||||
|
||||
version = lib.fileContents ./.version + versionSuffix;
|
||||
versionJson = builtins.fromJSON (builtins.readFile ./version.json);
|
||||
version = versionJson.version + versionSuffix;
|
||||
|
||||
aws-sdk-cpp-nix = aws-sdk-cpp.override {
|
||||
apis = [
|
||||
|
@ -138,7 +139,7 @@ let
|
|||
# that would interfere with repo semantics.
|
||||
baseFiles = fileset.fileFilter (f: f.name != ".gitignore") ./.;
|
||||
|
||||
configureFiles = fileset.unions [ ./.version ];
|
||||
configureFiles = fileset.unions [ ./version.json ];
|
||||
|
||||
topLevelBuildFiles = fileset.unions ([
|
||||
./meson.build
|
||||
|
|
|
@ -23,7 +23,7 @@ perl.pkgs.toPerlModule (
|
|||
src = fileset.toSource {
|
||||
root = ../.;
|
||||
fileset = fileset.unions ([
|
||||
../.version
|
||||
../version.json
|
||||
./lib
|
||||
./meson.build
|
||||
]);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
project('lix-perl', 'cpp',
|
||||
version : run_command('bash', '-c', 'echo -n $(cat ../.version)$VERSION_SUFFIX', check : true).stdout().strip(),
|
||||
version : run_command('bash', '-c', 'echo -n $(jq -r .version < ../version.json)$VERSION_SUFFIX', check : true).stdout().strip(),
|
||||
default_options : [
|
||||
'cpp_std=c++2a',
|
||||
# TODO(Qyriad): increase the warning level
|
||||
|
|
4
version.json
Normal file
4
version.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": "2.90.0",
|
||||
"release_name": "Vanilla Ice Cream"
|
||||
}
|
Loading…
Reference in a new issue