Skip to content
Snippets Groups Projects
Verified Commit b95196c3 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: update git-commit script, and test build #5

parent 29452e0b
No related branches found
Tags 0.4.16
No related merge requests found
......@@ -23,6 +23,15 @@ tasks:
- source/**/*.mod
- dist/**
release:
desc: Commit changes (update version, hashes, etc.)
aliases:
- cc
cmds:
- update-hashes || true
- git-commit
- update-version
update-code:
desc: Update the code, calculate hashes and update version
aliases:
......
......@@ -87,21 +87,6 @@
"type": "github"
}
},
"git-commit": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1,
"narHash": "sha256-8hXrOA8SKy//ctoL1poIhJwuT7G4rvVu7FguROzEoDg=",
"path": "./git-commit",
"type": "path"
},
"original": {
"path": "./git-commit",
"type": "path"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
......@@ -179,25 +164,6 @@
"type": "github"
}
},
"nix-templates": {
"inputs": {
"git-commit": "git-commit",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1704993617,
"narHash": "sha256-++u7I3KCDgP+JhW70k5tiLfBESWVSKdVK7aei0G+mR8=",
"ref": "refs/heads/master",
"rev": "e63b1d6ae5526158fa2a1f4cd53b0ea4f4c93573",
"revCount": 18,
"type": "git",
"url": "https://gitlab.schukai.com/schukai/entwicklung/nix-flakes"
},
"original": {
"type": "git",
"url": "https://gitlab.schukai.com/schukai/entwicklung/nix-flakes"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1678875422,
......@@ -265,36 +231,6 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1704874635,
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.11",
"type": "indirect"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1706373441,
"narHash": "sha256-S1hbgNbVYhuY2L05OANWqmRzj4cElcbLuIkXTb69xkk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "56911ef3403a9318b7621ce745f5452fb9ef6867",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.11",
"type": "indirect"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1706373441,
"narHash": "sha256-S1hbgNbVYhuY2L05OANWqmRzj4cElcbLuIkXTb69xkk=",
......@@ -310,7 +246,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_3": {
"locked": {
"lastModified": 1705856552,
"narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=",
......@@ -326,7 +262,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_4": {
"locked": {
"lastModified": 1704145853,
"narHash": "sha256-G/1AMt9ibpeMlcxvD1vNaC8imGaK+g7zZ99e29BLgWw=",
......@@ -375,10 +311,9 @@
"flake-parts": "flake-parts",
"flake-root": "flake-root",
"mk-shell-bin": "mk-shell-bin",
"nix-templates": "nix-templates",
"nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_2",
"treefmt-nix": "treefmt-nix",
"versionsTool": "versionsTool"
"versions-tool": "versions-tool"
}
},
"systems": {
......@@ -398,7 +333,7 @@
},
"treefmt-nix": {
"inputs": {
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1706462057,
......@@ -414,9 +349,9 @@
"type": "github"
}
},
"versionsTool": {
"versions-tool": {
"inputs": {
"nixpkgs": "nixpkgs_6"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1704542622,
......
......@@ -7,8 +7,7 @@
mk-shell-bin.url = "github:rrbutani/nix-mk-shell-bin";
flake-root.url = "github:srid/flake-root";
treefmt-nix.url = "github:numtide/treefmt-nix";
versionsTool.url = "git+https://gitlab.schukai.com/oss/utilities/version.git";
nix-templates.url = "git+https://gitlab.schukai.com/schukai/entwicklung/nix-flakes";
versions-tool.url = "git+https://gitlab.schukai.com/oss/utilities/version.git";
};
nixConfig = {
......@@ -19,8 +18,7 @@
outputs = inputs @ {
self,
flake-parts,
versionsTool,
nix-templates,
versions-tool,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
......@@ -130,7 +128,7 @@
name = projectDefinition.name;
scripts = let
versionsTool = inputs.versionsTool.defaultPackage."${builtins.currentSystem}";
versions-tool = inputs.versions-tool.defaultPackage."${builtins.currentSystem}";
workingDirectory = builtins.getEnv "PWD";
in {
......@@ -155,7 +153,11 @@
};
update-version.exec = import ./system/scripts/update-version.nix {
inherit pkgs config buildRoot projectDefinition versionsTool workingDirectory;
inherit pkgs config buildRoot projectDefinition versions-tool workingDirectory;
};
git-commit.exec = import ./system/scripts/git-commit.nix {
inherit pkgs;
};
};
......@@ -163,8 +165,7 @@
];
packages = with pkgs; [
inputs.versionsTool.defaultPackage."${builtins.currentSystem}"
inputs.nix-templates.packages."${builtins.currentSystem}".git-commit
inputs.versions-tool.defaultPackage."${builtins.currentSystem}"
nodePackages.prettier-plugin-toml
nodePackages.prettier
go-task
......
{pkgs, ...}: let
common = import ./common.nix {inherit pkgs;};
nix-flakes = builtins.getFlake "git+https://gitlab.schukai.com/schukai/entwicklung/nix-flakes";
in ''
#!${pkgs.bash}/bin/bash
${common}
${nix-flakes.packages.${builtins.currentSystem}.git-commit}/bin/git-commit
''
......@@ -2,7 +2,7 @@
pkgs,
buildRoot,
projectDefinition,
versionsTool,
versions-tool,
workingDirectory,
...
}: let
......@@ -14,7 +14,7 @@ in ''
${common}
cmd=${versionsTool}/bin/version
cmd=${versions-tool}/bin/version
echo_step "Getting current commit hash"
HASH=$(${pkgs.git}/bin/git -C ${workingDirectory}/ rev-parse --short HEAD)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment