Skip to content

Commit

Permalink
Update go to 1.22 (#112)
Browse files Browse the repository at this point in the history
* flake.lock: Update

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8' (2024-02-11)
  → 'github:NixOS/nixpkgs/35ff7e87ee05199a8003f438ec11a174bcbd98ea' (2024-02-13)

* Bump go version to 1.22 in flake

* `go get go@1.22`

* Prefer vendorHash rather than deprecated vendorSha256

* Drop staticcheck from dev dependency

* Update nix flake definition
  • Loading branch information
kachick committed Feb 16, 2024
1 parent c088426 commit 160ca78
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,3 @@ jobs:
- name: check format
run: go fmt ./... && git add --intent-to-add . && git diff --exit-code
- run: go vet ./...
# Because of default in vscode extension
- uses: dominikh/staticcheck-action@v1.3.0
with:
# Keep after `setup-go`, to use same go version
install-go: false
version: '2023.1.6' # selfup { "regex": "\\d{4}[^']+", "script": "staticcheck --version | cut -d ' ' -f 2" }
2 changes: 0 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ tasks:
- goreleaser check
- typos . .github .vscode
- nixpkgs-fmt --check ./*.nix
- staticcheck ./...
deps:
cmds:
- nix --version
Expand All @@ -54,4 +53,3 @@ tasks:
- dprint --version
- goreleaser --version
- typos --version
- staticcheck --version
11 changes: 6 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,26 @@
# https://github.com/NixOS/nix/issues/730#issuecomment-162323824
bashInteractive

go_1_21
go_1_22
nil
nixpkgs-fmt
dprint
actionlint
go-task
goreleaser
typos
go-tools
];
};

packages.selfup = pkgs.buildGo121Module {
packages.selfup = pkgs.buildGo122Module {
pname = "selfup";
version = updaterVersion;
src = pkgs.lib.cleanSource self;

# When updating go.mod or go.sum, update this sha together
vendorSha256 = "sha256-ot3JjQ49kLVG+l1EyLaxonDfgxTyFTmli3B8YDIjhyY=";
# When updating go.mod or go.sum, update this sha together as following
# vendorHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
# `pkgs.lib.fakeSha256` returns invalid string in thesedays... :<;
vendorHash = "sha256-ot3JjQ49kLVG+l1EyLaxonDfgxTyFTmli3B8YDIjhyY=";
};

packages.default = packages.selfup;
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/kachick/selfup

go 1.21

toolchain go1.21.1
go 1.22.0

require (
github.com/huandu/xstrings v1.4.0
Expand Down

0 comments on commit 160ca78

Please sign in to comment.