From ed288173fa448d6aaff3ec17d06ced803a950137 Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Mon, 29 Sep 2025 01:34:54 +0200 Subject: [PATCH 01/13] upd licence on all files --- cmd/credits.go | 3 +++ cmd/current-add.go | 3 +++ cmd/current-edit.go | 3 +++ cmd/current-export.go | 3 +++ cmd/current-pull.go | 3 +++ cmd/current-push.go | 3 +++ cmd/current.go | 3 +++ cmd/init.go | 4 ++++ cmd/main.go | 3 +++ cmd/status.go | 3 +++ internal/model/plugins.go | 3 +++ internal/model/secret.go | 3 +++ internal/model/secret_test.go | 3 +++ internal/model/vault.go | 3 +++ internal/plugin/a_main.go | 3 +++ internal/plugin/f_azdevops.go | 3 +++ internal/plugin/f_dotenv.go | 3 +++ internal/plugin/f_json.go | 3 +++ internal/plugin/f_passthrough.go | 3 +++ internal/plugin/f_pick.go | 3 +++ internal/plugin/f_posix.go | 3 +++ internal/plugin/f_pwsh.go | 3 +++ internal/plugin/f_stats.go | 3 +++ internal/plugin/formatters_test.go | 3 +++ internal/plugin/w_github.go | 3 +++ internal/plugin/w_onetimesecret.go | 3 +++ internal/plugin/w_stdout.go | 3 +++ internal/polyenvfile/func.go | 3 +++ internal/polyenvfile/func_test.go | 3 +++ internal/polyenvfile/main.go | 3 +++ internal/polyenvfile/main_test.go | 3 +++ internal/polyenvfile/options.go | 3 +++ internal/polyenvfile/options_test.go | 3 +++ internal/polyenvfile/tui.go | 3 +++ internal/tools/cli.go | 3 +++ internal/tools/file.go | 3 +++ internal/tools/file_test.go | 3 +++ internal/tools/git.go | 3 +++ internal/tools/http.go | 3 +++ internal/tools/math.go | 3 +++ internal/tools/tools.go | 3 +++ internal/tools/tools_test.go | 3 +++ internal/tools/vaildator.go | 3 +++ internal/tui/run.go | 3 +++ internal/vaults/dev_vaults.go | 3 +++ internal/vaults/devvault/devvault.go | 3 +++ internal/vaults/devvault/main_test.go | 3 +++ internal/vaults/keyvault/arguments.go | 3 +++ internal/vaults/keyvault/keyvault.go | 3 +++ internal/vaults/keyvault/keyvault_test.go | 3 +++ internal/vaults/keyvault/list.go | 3 +++ internal/vaults/keyvault/pull.go | 3 +++ internal/vaults/keyvault/push.go | 3 +++ internal/vaults/keyvault/wiz.go | 3 +++ internal/vaults/keyvault/wizard_tasks.go | 3 +++ internal/vaults/local/local.go | 3 +++ internal/vaults/local/local_test.go | 3 +++ internal/vaults/registry.go | 3 +++ internal/vaults/tools.go | 3 +++ internal/vaults/vaulttest/main.go | 3 +++ main.go | 3 +++ 61 files changed, 184 insertions(+) diff --git a/cmd/credits.go b/cmd/credits.go index 1f53924..4f032c6 100644 --- a/cmd/credits.go +++ b/cmd/credits.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Package cmd contains the polyenv cli components package cmd diff --git a/cmd/current-add.go b/cmd/current-add.go index edbd1cb..40cda92 100644 --- a/cmd/current-add.go +++ b/cmd/current-add.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package cmd import ( diff --git a/cmd/current-edit.go b/cmd/current-edit.go index f55726b..1cc444f 100644 --- a/cmd/current-edit.go +++ b/cmd/current-edit.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package cmd // import ( diff --git a/cmd/current-export.go b/cmd/current-export.go index a3d8528..52d5537 100644 --- a/cmd/current-export.go +++ b/cmd/current-export.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package cmd import ( diff --git a/cmd/current-pull.go b/cmd/current-pull.go index c789ace..35e1e59 100644 --- a/cmd/current-pull.go +++ b/cmd/current-pull.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package cmd import ( diff --git a/cmd/current-push.go b/cmd/current-push.go index 5ddae6b..dcc08a1 100644 --- a/cmd/current-push.go +++ b/cmd/current-push.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package cmd // import ( diff --git a/cmd/current.go b/cmd/current.go index d749e76..5a6d93a 100644 --- a/cmd/current.go +++ b/cmd/current.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package cmd import ( diff --git a/cmd/init.go b/cmd/init.go index 72e90f1..20f97c1 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -1,5 +1,9 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package cmd + import ( "fmt" "log/slog" diff --git a/cmd/main.go b/cmd/main.go index 4dec552..03439e7 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package cmd import ( diff --git a/cmd/status.go b/cmd/status.go index 058a0b2..5496f34 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package cmd import ( diff --git a/internal/model/plugins.go b/internal/model/plugins.go index 7e42e44..76754e1 100644 --- a/internal/model/plugins.go +++ b/internal/model/plugins.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package model type Source interface { diff --git a/internal/model/secret.go b/internal/model/secret.go index 1daa708..77242d3 100644 --- a/internal/model/secret.go +++ b/internal/model/secret.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package model import ( diff --git a/internal/model/secret_test.go b/internal/model/secret_test.go index 2ed9988..b8a6d84 100644 --- a/internal/model/secret_test.go +++ b/internal/model/secret_test.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package model import ( diff --git a/internal/model/vault.go b/internal/model/vault.go index e4172ca..fd69e08 100644 --- a/internal/model/vault.go +++ b/internal/model/vault.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Package model contains all models for polyenv package model diff --git a/internal/plugin/a_main.go b/internal/plugin/a_main.go index 453f621..f971d7d 100644 --- a/internal/plugin/a_main.go +++ b/internal/plugin/a_main.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Package plugin contains the polyenv plugin package plugin diff --git a/internal/plugin/f_azdevops.go b/internal/plugin/f_azdevops.go index 411ff7d..0162591 100644 --- a/internal/plugin/f_azdevops.go +++ b/internal/plugin/f_azdevops.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package plugin import ( diff --git a/internal/plugin/f_dotenv.go b/internal/plugin/f_dotenv.go index 4f5e7b8..8b271c6 100644 --- a/internal/plugin/f_dotenv.go +++ b/internal/plugin/f_dotenv.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package plugin import ( diff --git a/internal/plugin/f_json.go b/internal/plugin/f_json.go index 06e8da5..eb14d1b 100644 --- a/internal/plugin/f_json.go +++ b/internal/plugin/f_json.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package plugin import ( diff --git a/internal/plugin/f_passthrough.go b/internal/plugin/f_passthrough.go index 785c3df..9cea1d3 100644 --- a/internal/plugin/f_passthrough.go +++ b/internal/plugin/f_passthrough.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package plugin import ( diff --git a/internal/plugin/f_pick.go b/internal/plugin/f_pick.go index 9c48e66..3fee2e1 100644 --- a/internal/plugin/f_pick.go +++ b/internal/plugin/f_pick.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package plugin import ( diff --git a/internal/plugin/f_posix.go b/internal/plugin/f_posix.go index b4bc002..864a619 100644 --- a/internal/plugin/f_posix.go +++ b/internal/plugin/f_posix.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package plugin import ( diff --git a/internal/plugin/f_pwsh.go b/internal/plugin/f_pwsh.go index 454c27b..8c3ed77 100644 --- a/internal/plugin/f_pwsh.go +++ b/internal/plugin/f_pwsh.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package plugin import ( diff --git a/internal/plugin/f_stats.go b/internal/plugin/f_stats.go index 971d6c4..178f35a 100644 --- a/internal/plugin/f_stats.go +++ b/internal/plugin/f_stats.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package plugin import ( diff --git a/internal/plugin/formatters_test.go b/internal/plugin/formatters_test.go index a46a763..44673a9 100644 --- a/internal/plugin/formatters_test.go +++ b/internal/plugin/formatters_test.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package plugin import ( diff --git a/internal/plugin/w_github.go b/internal/plugin/w_github.go index 36cca6a..c15f131 100644 --- a/internal/plugin/w_github.go +++ b/internal/plugin/w_github.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package plugin import ( diff --git a/internal/plugin/w_onetimesecret.go b/internal/plugin/w_onetimesecret.go index d19c3fa..9ddb0f7 100644 --- a/internal/plugin/w_onetimesecret.go +++ b/internal/plugin/w_onetimesecret.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package plugin import ( diff --git a/internal/plugin/w_stdout.go b/internal/plugin/w_stdout.go index 86a777f..06d5665 100644 --- a/internal/plugin/w_stdout.go +++ b/internal/plugin/w_stdout.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package plugin import ( diff --git a/internal/polyenvfile/func.go b/internal/polyenvfile/func.go index b24888b..9645b9c 100644 --- a/internal/polyenvfile/func.go +++ b/internal/polyenvfile/func.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package polyenvfile import ( diff --git a/internal/polyenvfile/func_test.go b/internal/polyenvfile/func_test.go index 89948e5..10e5531 100644 --- a/internal/polyenvfile/func_test.go +++ b/internal/polyenvfile/func_test.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package polyenvfile import ( diff --git a/internal/polyenvfile/main.go b/internal/polyenvfile/main.go index ad9c242..625dae6 100644 --- a/internal/polyenvfile/main.go +++ b/internal/polyenvfile/main.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Package polyenvfile contains all functions related to the polyenv file package polyenvfile diff --git a/internal/polyenvfile/main_test.go b/internal/polyenvfile/main_test.go index 37d7718..74fa9b9 100644 --- a/internal/polyenvfile/main_test.go +++ b/internal/polyenvfile/main_test.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package polyenvfile import ( diff --git a/internal/polyenvfile/options.go b/internal/polyenvfile/options.go index 3f25754..f35643f 100644 --- a/internal/polyenvfile/options.go +++ b/internal/polyenvfile/options.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package polyenvfile import ( diff --git a/internal/polyenvfile/options_test.go b/internal/polyenvfile/options_test.go index 14c9d63..d30644d 100644 --- a/internal/polyenvfile/options_test.go +++ b/internal/polyenvfile/options_test.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package polyenvfile import ( diff --git a/internal/polyenvfile/tui.go b/internal/polyenvfile/tui.go index 6fb8629..f618c23 100644 --- a/internal/polyenvfile/tui.go +++ b/internal/polyenvfile/tui.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package polyenvfile import ( diff --git a/internal/tools/cli.go b/internal/tools/cli.go index ddb6b13..68df672 100644 --- a/internal/tools/cli.go +++ b/internal/tools/cli.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package tools import ( diff --git a/internal/tools/file.go b/internal/tools/file.go index 0a8c5f8..d277656 100644 --- a/internal/tools/file.go +++ b/internal/tools/file.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package tools import ( diff --git a/internal/tools/file_test.go b/internal/tools/file_test.go index e537094..e7a547d 100644 --- a/internal/tools/file_test.go +++ b/internal/tools/file_test.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package tools import ( diff --git a/internal/tools/git.go b/internal/tools/git.go index cd59126..35256c4 100644 --- a/internal/tools/git.go +++ b/internal/tools/git.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package tools import ( diff --git a/internal/tools/http.go b/internal/tools/http.go index c4785da..0f30420 100644 --- a/internal/tools/http.go +++ b/internal/tools/http.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package tools import ( diff --git a/internal/tools/math.go b/internal/tools/math.go index 1fb6102..7c14933 100644 --- a/internal/tools/math.go +++ b/internal/tools/math.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package tools // return max of two ints diff --git a/internal/tools/tools.go b/internal/tools/tools.go index 8220825..c386078 100644 --- a/internal/tools/tools.go +++ b/internal/tools/tools.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Package tools contains various tools and helpers for polyenv package tools diff --git a/internal/tools/tools_test.go b/internal/tools/tools_test.go index e22b7eb..e438030 100644 --- a/internal/tools/tools_test.go +++ b/internal/tools/tools_test.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package tools import "testing" diff --git a/internal/tools/vaildator.go b/internal/tools/vaildator.go index 8525996..dff63f2 100644 --- a/internal/tools/vaildator.go +++ b/internal/tools/vaildator.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package tools import ( diff --git a/internal/tui/run.go b/internal/tui/run.go index 4390dee..6fabb3a 100644 --- a/internal/tui/run.go +++ b/internal/tui/run.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Package tui contains helper functions for the tui package tui diff --git a/internal/vaults/dev_vaults.go b/internal/vaults/dev_vaults.go index 53fce8d..1925a3e 100644 --- a/internal/vaults/dev_vaults.go +++ b/internal/vaults/dev_vaults.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + //go:build !omitdevpackage package vaults diff --git a/internal/vaults/devvault/devvault.go b/internal/vaults/devvault/devvault.go index 9d762bf..ce99b40 100644 --- a/internal/vaults/devvault/devvault.go +++ b/internal/vaults/devvault/devvault.go @@ -1,5 +1,8 @@ //go:build !omitdevpackage +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Package devvault contains a development vault that can be used for testing package devvault diff --git a/internal/vaults/devvault/main_test.go b/internal/vaults/devvault/main_test.go index 6308e40..ce153be 100644 --- a/internal/vaults/devvault/main_test.go +++ b/internal/vaults/devvault/main_test.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package devvault import ( diff --git a/internal/vaults/keyvault/arguments.go b/internal/vaults/keyvault/arguments.go index f694abd..e376da0 100644 --- a/internal/vaults/keyvault/arguments.go +++ b/internal/vaults/keyvault/arguments.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package keyvault import ( diff --git a/internal/vaults/keyvault/keyvault.go b/internal/vaults/keyvault/keyvault.go index 773731c..79ebfa3 100644 --- a/internal/vaults/keyvault/keyvault.go +++ b/internal/vaults/keyvault/keyvault.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + /* notify:@withholm */ diff --git a/internal/vaults/keyvault/keyvault_test.go b/internal/vaults/keyvault/keyvault_test.go index ee616e7..ed216d1 100644 --- a/internal/vaults/keyvault/keyvault_test.go +++ b/internal/vaults/keyvault/keyvault_test.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package keyvault import ( diff --git a/internal/vaults/keyvault/list.go b/internal/vaults/keyvault/list.go index b49a896..97b3d5d 100644 --- a/internal/vaults/keyvault/list.go +++ b/internal/vaults/keyvault/list.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package keyvault import ( diff --git a/internal/vaults/keyvault/pull.go b/internal/vaults/keyvault/pull.go index ad43326..863af9a 100644 --- a/internal/vaults/keyvault/pull.go +++ b/internal/vaults/keyvault/pull.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package keyvault import ( diff --git a/internal/vaults/keyvault/push.go b/internal/vaults/keyvault/push.go index bdd9a2d..a992290 100644 --- a/internal/vaults/keyvault/push.go +++ b/internal/vaults/keyvault/push.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package keyvault import ( diff --git a/internal/vaults/keyvault/wiz.go b/internal/vaults/keyvault/wiz.go index e89b0c1..cd285ab 100644 --- a/internal/vaults/keyvault/wiz.go +++ b/internal/vaults/keyvault/wiz.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package keyvault import ( diff --git a/internal/vaults/keyvault/wizard_tasks.go b/internal/vaults/keyvault/wizard_tasks.go index 1e38bf8..3570fed 100644 --- a/internal/vaults/keyvault/wizard_tasks.go +++ b/internal/vaults/keyvault/wizard_tasks.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package keyvault import ( diff --git a/internal/vaults/local/local.go b/internal/vaults/local/local.go index d229f57..1bb2256 100644 --- a/internal/vaults/local/local.go +++ b/internal/vaults/local/local.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Package local contains a local vault that connects to a local cred-store package local diff --git a/internal/vaults/local/local_test.go b/internal/vaults/local/local_test.go index 1e1bbdc..7e93d19 100644 --- a/internal/vaults/local/local_test.go +++ b/internal/vaults/local/local_test.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package local import ( diff --git a/internal/vaults/registry.go b/internal/vaults/registry.go index d80390c..ef919f7 100644 --- a/internal/vaults/registry.go +++ b/internal/vaults/registry.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Package vaults contains all vaults that polyenv supports package vaults diff --git a/internal/vaults/tools.go b/internal/vaults/tools.go index dcb9dc0..b9137c8 100644 --- a/internal/vaults/tools.go +++ b/internal/vaults/tools.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package vaults import ( diff --git a/internal/vaults/vaulttest/main.go b/internal/vaults/vaulttest/main.go index 03b13d4..b8689ba 100644 --- a/internal/vaults/vaulttest/main.go +++ b/internal/vaults/vaulttest/main.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + // Package vaulttest contains a generic test suite for the model.Vault interface. package vaulttest diff --git a/main.go b/main.go index 3747d85..c7d8ca4 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,6 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. + package main import ( From f9f3f3935f9846aa9ee483d941cd5d90f9d6f2b9 Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Mon, 29 Sep 2025 23:56:45 +0200 Subject: [PATCH 02/13] fix test framework and add license check on files --- .github/workflows/all-check-licence.yml | 24 +++++ .github/workflows/all-test-and-lint.yml | 121 +++++++++++++++++------- LicenceHeader | 2 + 3 files changed, 115 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/all-check-licence.yml create mode 100644 LicenceHeader diff --git a/.github/workflows/all-check-licence.yml b/.github/workflows/all-check-licence.yml new file mode 100644 index 0000000..2788104 --- /dev/null +++ b/.github/workflows/all-check-licence.yml @@ -0,0 +1,24 @@ +name: Check Licence + +on: + pull_request: + types: [opened, synchronize, reopened] + paths: + - '**/*.go' + + +jobs: + check-licence: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: "go.mod" + cache: true + - name: Check licence + uses: withholm/check-licence-action@v1 + with: + path: "**/*.go" + fail-on-non-approved: true \ No newline at end of file diff --git a/.github/workflows/all-test-and-lint.yml b/.github/workflows/all-test-and-lint.yml index 25a459e..cab3c2a 100644 --- a/.github/workflows/all-test-and-lint.yml +++ b/.github/workflows/all-test-and-lint.yml @@ -8,6 +8,9 @@ on: - 'go.sum' - '**/*.go' +env: + LicenseHeaderPath: "./LicenceHeader" + jobs: lint: if: github.actor != 'dependabot[bot]' @@ -30,24 +33,25 @@ jobs: if: github.actor != 'dependabot[bot]' runs-on: ubuntu-latest outputs: - matrix: ${{ steps.unique-directories.outputs.directories }} - go_files_changed: ${{ steps.changed-go-files.outputs.any_changed }} - go_mod_changed: ${{ steps.check-go-mod.outputs.any_changed }} + should_test: ${{steps.concat_paths.outputs.RunTests}} + paths: ${{steps.concat_paths.outputs.path}} + mod_test: ${{steps.changed_mod_files.outputs.any_changed}} + go_test: ${{steps.changed_go_files.outputs.any_changed}} steps: - uses: actions/checkout@v5 with: fetch-depth: 0 - - name: Check for go.mod/go.sum changes - id: check-go-mod + - name: Changed mod files + id: changed_mod_files uses: tj-actions/changed-files@v46 with: files: | go.mod go.sum - - name: Get changed .go files - id: changed-go-files + - name: Changed go files + id: changed_go_files uses: tj-actions/changed-files@v46 with: files: | @@ -57,35 +61,88 @@ jobs: vendor/** - name: Get unique directories for changed .go files - id: unique-directories + id: concat_paths + env: + modChanged: ${{ steps.changed_mod_files.outputs.any_changed }} + modChangedFiles: "cmd/... ./internal/..." + goChanged: ${{ steps.changed_go_files.outputs.any_changed }} + goChangedFiles: ${{ steps.changed_go_files.outputs.all_changed_files }} run: | - DIRS=$(echo '${{ steps.changed-go-files.outputs.all_changed_files }}' | jq -r '.[]' | xargs -I {} dirname {} | sort -u | jq -R -s -c 'split("\n")[:-1]') - echo "unique directories: $DIRS" - echo "directories=$DIRS" >> $GITHUB_OUTPUT + path="" + RunTests=false + if [[$modChanged == "true"]]; then + path=$modChangedFiles + RunTests=true + elif [[ $goChanged == "true" ]]; then + path=$(echo "${goChangedFiles}" | jq -r '.[]'|xargs) + RunTests=true + fi + echo "path=$path" >> $GITHUB_OUTPUT + echo "RunTests=$RunTests" >> $GITHUB_OUTPUT - - # only run if go.mod or go.sum changed.. - full-test: + # all paths should be set as a single string, separated by space. this wall all tests tests all files in a single pass + # limits any ci to a single "run" compared to the matrix strategy. saves alot of time and resources + test: needs: [changed-packages] - if: github.actor != 'dependabot[bot]' && needs.changed-packages.outputs.go_mod_changed == 'true' + if: needs.changed-packages.outputs.should_test == 'true' runs-on: ubuntu-latest steps: - - name: full test - uses: ./.github/workflows/shared/test.yaml + - uses: actions/checkout@v5 + - name: Set up Go + uses: actions/setup-go@v5 with: - full_test: true + go-version-file: "go.mod" + cache: true + - name: install tools + run: | + go install golang.org/x/vuln/cmd/govulncheck@latest + go install honnef.co/go/tools/cmd/staticcheck@latest + - name: Run staticcheck + id: staticcheck + run: | + staticcheck "${{ needs.changed-packages.outputs.paths }}" + - name: Run tests + id : test + run: | + go test -v -race "${{ needs.changed-packages.outputs.paths }}" + - name: Run govulncheck + id : check-vuln + run: | + govulncheck "${{ needs.changed-packages.outputs.paths }}" + + - name: Check File Header for License + if: needs.changed-packages.outputs.mod_test == false + id : check-license + run: | + # 1. Validate that the path variable is set and the file exists + if [ -z "$LicenseHeaderPath" ]; then + echo "::error::Required 'LicenseHeaderPath' environment variable is not set." + exit 1 + fi + if [ ! -f "$LicenseHeaderPath" ]; then + echo "::error::License header file not found at '$LicenseHeaderPath'." + exit 1 + fi + + # 2. Read the expected license string from the file + LICENSE_STRING=$(cat "$LicenseHeaderPath") + + # 3. Get the space-delimited list of files to check + path="${{ needs.changed-packages.outputs.paths }}" + + echo "Checking for license header in the following files:" + echo "$path" + echo "---" + + # 4. Loop through files and check the first 20 lines for the license string + for file in $path; do + echo "Checking: $file" + if ! head -n 20 "$file" | grep -q -F -i "$LICENSE_STRING"; then + echo "::error file=$file::File does not contain the required license header in its first 20 lines." + exit 1 + fi + done + + echo "---" + echo "Success! All checked files contain the license header." - # only run if mod has not changed and *.go files have changed - run_tests: - needs: [changed-packages] - if: github.actor != 'dependabot[bot]' && (needs.changed-packages.outputs.go_files_changed == 'true' || needs.changed-packages.outputs.go_mod_changed == 'false') - runs-on: ubuntu-latest - strategy: - matrix: - packages: ${{ fromJSON(needs.changed-packages.outputs.matrix) }} - fail-fast: false - steps: - - name: Package test - uses: ./.github/workflows/shared/test.yaml - with: - path: ${{ matrix.packages }} diff --git a/LicenceHeader b/LicenceHeader new file mode 100644 index 0000000..d3751a5 --- /dev/null +++ b/LicenceHeader @@ -0,0 +1,2 @@ +// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. +// If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. \ No newline at end of file From e51da5b6b28063e4ee662cce8611316b54440c2a Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Tue, 30 Sep 2025 00:11:22 +0200 Subject: [PATCH 03/13] upd fix pipeline --- .github/workflows/all-check-licence.yml | 24 ------------------------ .github/workflows/all-test-and-lint.yml | 16 ++++++++++------ LicenceHeader => LicenseHeader | 0 3 files changed, 10 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/all-check-licence.yml rename LicenceHeader => LicenseHeader (100%) diff --git a/.github/workflows/all-check-licence.yml b/.github/workflows/all-check-licence.yml deleted file mode 100644 index 2788104..0000000 --- a/.github/workflows/all-check-licence.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Check Licence - -on: - pull_request: - types: [opened, synchronize, reopened] - paths: - - '**/*.go' - - -jobs: - check-licence: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: "go.mod" - cache: true - - name: Check licence - uses: withholm/check-licence-action@v1 - with: - path: "**/*.go" - fail-on-non-approved: true \ No newline at end of file diff --git a/.github/workflows/all-test-and-lint.yml b/.github/workflows/all-test-and-lint.yml index cab3c2a..8dea5b2 100644 --- a/.github/workflows/all-test-and-lint.yml +++ b/.github/workflows/all-test-and-lint.yml @@ -9,7 +9,7 @@ on: - '**/*.go' env: - LicenseHeaderPath: "./LicenceHeader" + LicenseHeaderPath: "./LicenseHeader" jobs: lint: @@ -70,7 +70,7 @@ jobs: run: | path="" RunTests=false - if [[$modChanged == "true"]]; then + if [[ $modChanged == "true" ]]; then path=$modChangedFiles RunTests=true elif [[ $goChanged == "true" ]]; then @@ -100,18 +100,17 @@ jobs: - name: Run staticcheck id: staticcheck run: | - staticcheck "${{ needs.changed-packages.outputs.paths }}" + staticcheck ${{ needs.changed-packages.outputs.paths }} - name: Run tests id : test run: | - go test -v -race "${{ needs.changed-packages.outputs.paths }}" + go test -v -race ${{ needs.changed-packages.outputs.paths }} - name: Run govulncheck id : check-vuln run: | - govulncheck "${{ needs.changed-packages.outputs.paths }}" + govulncheck ${{ needs.changed-packages.outputs.paths }} - name: Check File Header for License - if: needs.changed-packages.outputs.mod_test == false id : check-license run: | # 1. Validate that the path variable is set and the file exists @@ -136,6 +135,11 @@ jobs: # 4. Loop through files and check the first 20 lines for the license string for file in $path; do + if [[ "$file" != *.go ]]; then + echo "Skipping non-Go file: $file" + continue + fi + echo "Checking: $file" if ! head -n 20 "$file" | grep -q -F -i "$LICENSE_STRING"; then echo "::error file=$file::File does not contain the required license header in its first 20 lines." diff --git a/LicenceHeader b/LicenseHeader similarity index 100% rename from LicenceHeader rename to LicenseHeader From a7c89877154983af45eb25d699cc150029220420 Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Tue, 30 Sep 2025 00:17:07 +0200 Subject: [PATCH 04/13] fix path stuff --- .github/workflows/all-test-and-lint.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/all-test-and-lint.yml b/.github/workflows/all-test-and-lint.yml index 8dea5b2..bf21aa3 100644 --- a/.github/workflows/all-test-and-lint.yml +++ b/.github/workflows/all-test-and-lint.yml @@ -62,6 +62,7 @@ jobs: - name: Get unique directories for changed .go files id: concat_paths + env: modChanged: ${{ steps.changed_mod_files.outputs.any_changed }} modChangedFiles: "cmd/... ./internal/..." @@ -74,7 +75,7 @@ jobs: path=$modChangedFiles RunTests=true elif [[ $goChanged == "true" ]]; then - path=$(echo "${goChangedFiles}" | jq -r '.[]'|xargs) + path=$goChangedFiles RunTests=true fi echo "path=$path" >> $GITHUB_OUTPUT @@ -139,7 +140,7 @@ jobs: echo "Skipping non-Go file: $file" continue fi - + echo "Checking: $file" if ! head -n 20 "$file" | grep -q -F -i "$LICENSE_STRING"; then echo "::error file=$file::File does not contain the required license header in its first 20 lines." From d6384b040ab0e1f0e6c698411836bd8d0b16f6c0 Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Tue, 30 Sep 2025 16:14:36 +0200 Subject: [PATCH 05/13] upd flow --- .github/workflows/all-test-and-lint.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/all-test-and-lint.yml b/.github/workflows/all-test-and-lint.yml index bf21aa3..886dafe 100644 --- a/.github/workflows/all-test-and-lint.yml +++ b/.github/workflows/all-test-and-lint.yml @@ -98,18 +98,34 @@ jobs: run: | go install golang.org/x/vuln/cmd/govulncheck@latest go install honnef.co/go/tools/cmd/staticcheck@latest + + - name: Prepare Package Paths + id: prep_packages + shell: bash + run: | + FILE_PATHS="${{ needs.changed-packages.outputs.paths }}" + PACKAGE_PATHS="" + # If go.mod changed, the paths are already package patterns, so use them directly. + if [[ "${{ needs.changed-packages.outputs.mod_test }}" == "true" ]]; then + PACKAGE_PATHS=$FILE_PATHS + else + # Otherwise, convert the file list to a unique, space-delimited list of directories. + PACKAGE_PATHS=$(echo "$FILE_PATHS" | tr ' ' '\n' | xargs -I {} dirname {} | sort -u | sed 's|.*|./&|' | xargs) + fi + echo "Prepared Package Paths: $PACKAGE_PATHS" + echo "package_paths=$PACKAGE_PATHS" >> "$GITHUB_OUTPUT" - name: Run staticcheck id: staticcheck run: | - staticcheck ${{ needs.changed-packages.outputs.paths }} + staticcheck ${{ steps.prep_packages.outputs.package_paths}} - name: Run tests id : test run: | - go test -v -race ${{ needs.changed-packages.outputs.paths }} + go test -v -race ${{ steps.prep_packages.outputs.package_paths}} - name: Run govulncheck id : check-vuln run: | - govulncheck ${{ needs.changed-packages.outputs.paths }} + govulncheck ${{ steps.prep_packages.outputs.package_paths}} - name: Check File Header for License id : check-license From 9ebe0e4dd16cb8838220885ea7d38acd538306e2 Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Tue, 30 Sep 2025 16:57:20 +0200 Subject: [PATCH 06/13] upd --- .github/workflows/all-test-and-lint.yml | 4 ++-- cmd/init.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/all-test-and-lint.yml b/.github/workflows/all-test-and-lint.yml index 886dafe..9f6e321 100644 --- a/.github/workflows/all-test-and-lint.yml +++ b/.github/workflows/all-test-and-lint.yml @@ -109,8 +109,8 @@ jobs: if [[ "${{ needs.changed-packages.outputs.mod_test }}" == "true" ]]; then PACKAGE_PATHS=$FILE_PATHS else - # Otherwise, convert the file list to a unique, space-delimited list of directories. - PACKAGE_PATHS=$(echo "$FILE_PATHS" | tr ' ' '\n' | xargs -I {} dirname {} | sort -u | sed 's|.*|./&|' | xargs) + # Convert file list to a unique directory list, excluding the root directory './.' + PACKAGE_PATHS=$(echo "$FILE_PATHS" | tr ' ' '\n' | xargs -I {} dirname {} | sort -u | grep -v -x "\." | sed 's|.*|./&|' | xargs) fi echo "Prepared Package Paths: $PACKAGE_PATHS" echo "package_paths=$PACKAGE_PATHS" >> "$GITHUB_OUTPUT" diff --git a/cmd/init.go b/cmd/init.go index 20f97c1..1a81a8d 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -3,7 +3,6 @@ package cmd - import ( "fmt" "log/slog" @@ -20,7 +19,8 @@ import ( var vaultType string var initargs []string -var acceptPolyenvDefaults bool + +// var acceptPolyenvDefaults bool var vaultTypes []string // var checkgitignore bool From a6379b568194461bbe1abae6204f368064bf3692 Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Tue, 30 Sep 2025 17:04:12 +0200 Subject: [PATCH 07/13] upd changelog thingy --- .github/workflows/dev-changelog-on-pr-open.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dev-changelog-on-pr-open.yml b/.github/workflows/dev-changelog-on-pr-open.yml index 2574473..416b890 100644 --- a/.github/workflows/dev-changelog-on-pr-open.yml +++ b/.github/workflows/dev-changelog-on-pr-open.yml @@ -17,6 +17,8 @@ jobs: outputs: changelog_exists: ${{ steps.check_changelog.outputs.changelog_exists }} steps: + - uses: actions/checkout@v5 + - name: Check if changelog fragment exists id: check_changelog uses: ./.github/workflows/shared/check_changelog-file.yaml From dc93c8a4fa9b20cefadda2ed9c3b4d4a492425c2 Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Tue, 30 Sep 2025 17:09:53 +0200 Subject: [PATCH 08/13] upd --- .../workflows/dev-changelog-on-pr-open.yml | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/dev-changelog-on-pr-open.yml b/.github/workflows/dev-changelog-on-pr-open.yml index 416b890..ce1710c 100644 --- a/.github/workflows/dev-changelog-on-pr-open.yml +++ b/.github/workflows/dev-changelog-on-pr-open.yml @@ -11,27 +11,10 @@ env: header: "## Changes" jobs: - check_if_changelog_exists: - if: ${{github.actor != 'dependabot[bot]'}} - runs-on: ubuntu-latest - outputs: - changelog_exists: ${{ steps.check_changelog.outputs.changelog_exists }} - steps: - - uses: actions/checkout@v5 - - - name: Check if changelog fragment exists - id: check_changelog - uses: ./.github/workflows/shared/check_changelog-file.yaml - with: - pr-number: ${{ github.event.pull_request.number }} - repo: ${{ github.event.pull_request.head.repo.full_name }} - commit-ref: ${{ github.event.pull_request.head.ref }} - check_changelog_exist: true - changelog-text: "" create-changelog-fragment: runs-on: ubuntu-latest - needs: check_if_changelog_exists - if: needs.check_if_changelog_exists.outputs.changelog_exists == 'false' + # needs: check_if_changelog_exists + # if: needs.check_if_changelog_exists.outputs.changelog_exists == 'false' permissions: contents: write steps: From c3049c542c15642d9badb21e15c8f09e7adc182e Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Tue, 30 Sep 2025 17:29:45 +0200 Subject: [PATCH 09/13] upd --- .github/workflows/dev-changelog-on-pr-open.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dev-changelog-on-pr-open.yml b/.github/workflows/dev-changelog-on-pr-open.yml index ce1710c..36e12ee 100644 --- a/.github/workflows/dev-changelog-on-pr-open.yml +++ b/.github/workflows/dev-changelog-on-pr-open.yml @@ -10,6 +10,7 @@ env: title : ${{ github.event.pull_request.title }} header: "## Changes" + jobs: create-changelog-fragment: runs-on: ubuntu-latest From 84efd02c7a91793bf12981a627cac653716de3ab Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Tue, 30 Sep 2025 17:52:42 +0200 Subject: [PATCH 10/13] upd --- .github/workflows/all-test-and-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/all-test-and-lint.yml b/.github/workflows/all-test-and-lint.yml index 9f6e321..4ed00c4 100644 --- a/.github/workflows/all-test-and-lint.yml +++ b/.github/workflows/all-test-and-lint.yml @@ -125,7 +125,7 @@ jobs: - name: Run govulncheck id : check-vuln run: | - govulncheck ${{ steps.prep_packages.outputs.package_paths}} + govulncheck -show verbose ${{ steps.prep_packages.outputs.package_paths}} - name: Check File Header for License id : check-license From 65a77f19c21725e411448c2430c128d099f46166 Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Tue, 30 Sep 2025 18:23:05 +0200 Subject: [PATCH 11/13] upd go mod version --- .github/workflows/all-test-and-lint.yml | 2 +- go.mod | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/all-test-and-lint.yml b/.github/workflows/all-test-and-lint.yml index 4ed00c4..0129b9e 100644 --- a/.github/workflows/all-test-and-lint.yml +++ b/.github/workflows/all-test-and-lint.yml @@ -121,7 +121,7 @@ jobs: - name: Run tests id : test run: | - go test -v -race ${{ steps.prep_packages.outputs.package_paths}} + go test -race ${{ steps.prep_packages.outputs.package_paths}} - name: Run govulncheck id : check-vuln run: | diff --git a/go.mod b/go.mod index 5a37b0e..2e7516f 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/withholm/polyenv -go 1.24.0 - -toolchain go1.24.1 +go 1.24.6 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.19.0 From 39f7e9341f56d383616e71abe6cb56b0864bf0eb Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Tue, 30 Sep 2025 22:34:55 +0200 Subject: [PATCH 12/13] upd --- .github/workflows/all-test-and-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/all-test-and-lint.yml b/.github/workflows/all-test-and-lint.yml index 0129b9e..913bdbf 100644 --- a/.github/workflows/all-test-and-lint.yml +++ b/.github/workflows/all-test-and-lint.yml @@ -117,7 +117,7 @@ jobs: - name: Run staticcheck id: staticcheck run: | - staticcheck ${{ steps.prep_packages.outputs.package_paths}} + staticcheck ./... - name: Run tests id : test run: | From 48a3aeecaad2ead007b4417ecb168bda97bc485b Mon Sep 17 00:00:00 2001 From: Philip Meholm Date: Tue, 30 Sep 2025 23:56:36 +0200 Subject: [PATCH 13/13] upd fix start offix paths used for tests --- .github/workflows/all-test-and-lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/all-test-and-lint.yml b/.github/workflows/all-test-and-lint.yml index 913bdbf..d063a7c 100644 --- a/.github/workflows/all-test-and-lint.yml +++ b/.github/workflows/all-test-and-lint.yml @@ -65,7 +65,7 @@ jobs: env: modChanged: ${{ steps.changed_mod_files.outputs.any_changed }} - modChangedFiles: "cmd/... ./internal/..." + modChangedFiles: "./cmd/... ./internal/..." goChanged: ${{ steps.changed_go_files.outputs.any_changed }} goChangedFiles: ${{ steps.changed_go_files.outputs.all_changed_files }} run: | @@ -75,7 +75,7 @@ jobs: path=$modChangedFiles RunTests=true elif [[ $goChanged == "true" ]]; then - path=$goChangedFiles + path=$(echo "$goChangedFiles" | tr ' ' '\n' | sed 's|.*|./&|' | xargs) RunTests=true fi echo "path=$path" >> $GITHUB_OUTPUT @@ -117,7 +117,7 @@ jobs: - name: Run staticcheck id: staticcheck run: | - staticcheck ./... + staticcheck ${{ steps.prep_packages.outputs.package_paths}} - name: Run tests id : test run: |