about summary refs log tree commit diff
path: root/flake
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-01-26 08:10:34 -0800
committerFranck Cuny <franck@fcuny.net>2024-01-26 08:10:34 -0800
commite8fc52950e7b8a79770addeb134d278d25a1521b (patch)
treeae91bf06be70c578a0e8a1c96b2271c6a1dabe87 /flake
parentfail if the token is missing (diff)
downloadworld-e8fc52950e7b8a79770addeb134d278d25a1521b.tar.gz
print various environments variable from CI
CI is currently failing with the following error:
```
go: errors parsing go.mod:
/home/runner/work/world/world/go.mod:3: invalid go version '1.21.4': must match format 1.23
```

From [1]:
> Before Go 1.21, the initial release of a Go toolchain was version 1.N, not 1.N.0

which makes me think that I'm CI is running with a version of go older
than 1.21, while I specify 1.21 in my nix config. If that's the case,
something is not correct in the CI environment and I should fix it.

Hopefully the script will give me the information I need to debug this.

[1] https://go.dev/doc/toolchain#version
Diffstat (limited to '')
-rw-r--r--flake/devshell.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/flake/devshell.nix b/flake/devshell.nix
index 2cdce16..79bb2f9 100644
--- a/flake/devshell.nix
+++ b/flake/devshell.nix
@@ -16,6 +16,8 @@
         packages = with pkgs; [
           (config.treefmt.build.wrapper)
 
+          python3
+
           go_1_21
           gopls
           golangci-lint
@@ -29,6 +31,12 @@
         commands = [
           { package = config.treefmt.build.wrapper; }
           {
+            name = "environment";
+            help = "Print various information from CI";
+            category = "CI";
+            command = "make build-environment";
+          }
+          {
             name = "update";
             help = "Update + Commit the Lock File";
             command = "nix flake update --commit-lock-file";