|
|
@ -24,6 +24,7 @@ import (
|
|
|
|
"path"
|
|
|
|
"path"
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
|
"regexp"
|
|
|
|
"regexp"
|
|
|
|
|
|
|
|
"slices"
|
|
|
|
"sort"
|
|
|
|
"sort"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
|
@ -206,12 +207,7 @@ func newTemplateCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func isTestHook(h *release.Hook) bool {
|
|
|
|
func isTestHook(h *release.Hook) bool {
|
|
|
|
for _, e := range h.Events {
|
|
|
|
return slices.Contains(h.Events, release.HookTest)
|
|
|
|
if e == release.HookTest {
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The following functions (writeToFile, createOrOpenFile, and ensureDirectoryForFile)
|
|
|
|
// The following functions (writeToFile, createOrOpenFile, and ensureDirectoryForFile)
|
|
|
|