From 3d7b2602daaff5c20164ffd873879cc152a13169 Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Mon, 29 Jan 2024 15:15:02 +0100 Subject: [PATCH] fix: text build script --- Taskfile.yml | 2 +- flake.nix | 24 +++--------------------- project.nix | 2 +- source/command.go | 2 +- 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 2ef8946..f8bcaaa 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -17,7 +17,7 @@ tasks: sh: echo "$DEVENV_ROOT" cmds: - - devenv shell build-app + - nix build --no-link --out-link dist/app sources: - source/**/*.go - source/**/*.mod diff --git a/flake.nix b/flake.nix index 7a0f268..ec02c1e 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "This is a Alvine Cloud NixOS configuration flake."; + description = "Configuration for the bob project"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; @@ -44,7 +44,6 @@ projectDefinition = import ./project.nix; buildRoot = ./.; - ## if you want to debug the container, you can enable the debug package enableDebugPackage = true; portAsString = toString projectDefinition.k8s.port; @@ -86,8 +85,8 @@ "-X '${projectDefinition.modulePath}/release.buildDate=${lastModifiedDate}'" ]; - vendorHash = null; - #vendorHash = projectDefinition.vendorHash; + #vendorHash = null; + vendorHash = projectDefinition.vendorHash; #vendorHash = system.lib.fakeHash; proxyVendor = true; @@ -143,10 +142,6 @@ ${config.treefmt.build.wrapper}/bin/treefmt ''; - # post-init-setup.exec = import ./system/scripts/post-init-setup.nix { - # inherit pkgs config buildRoot projectDefinition; - # }; - rm-gitlab-pipelines.exec = import ./system/scripts/rm-gitlab-pipelines.nix { inherit pkgs config buildRoot projectDefinition; }; @@ -167,17 +162,12 @@ inherit pkgs config buildRoot projectDefinition versionsTool workingDirectory; }; - # build-image.exec = import ./system/scripts/build-images.nix { - # inherit pkgs config buildRoot projectDefinition; - # }; }; imports = []; packages = with pkgs; [ inputs.versionsTool.defaultPackage."${builtins.currentSystem}" - - go-task ]; @@ -193,16 +183,8 @@ }; }; - - flake = { - - - - }; - - }; } diff --git a/project.nix b/project.nix index 012324e..ebf1232 100644 --- a/project.nix +++ b/project.nix @@ -5,6 +5,6 @@ supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; compileForSystems = ["linux/arm64" "linux/amd64" "darwin/amd64" "windows/amd64"]; modulePath = "gitlab.schukai.com/oss/bob"; - version = "0.1.0"; ## do not change this line; it will be updated automatically + version = "0.4.10"; ## do not change this line; it will be updated automatically vendorHash = null; ## do not change this line; it will be updated automatically } diff --git a/source/command.go b/source/command.go index a16c5d0..bbfe296 100644 --- a/source/command.go +++ b/source/command.go @@ -42,7 +42,7 @@ type Definition struct { } func (d *Definition) PrintVersion(s *xflags.Settings[Definition]) { - fmt.Println(release.GetMnemonic() + " " + release.GetVersion() + " (" + release.GetBuildDate() + ")") + fmt.Println(release.GetMnemonic() + " " + release.GetVersion() + " (" + release.GetCommit() + ")") } func (d *Definition) CutHTML(s *xflags.Settings[Definition]) { -- GitLab