]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
common/hugo: Add withdeploy to the version string printed in hugo version
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 5 Nov 2024 08:57:12 +0000 (09:57 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 5 Nov 2024 10:40:42 +0000 (11:40 +0100)
common/hugo/vars_withdeploy.go [new file with mode: 0644]
common/hugo/vars_withdeploy_off.go [new file with mode: 0644]
common/hugo/version.go

diff --git a/common/hugo/vars_withdeploy.go b/common/hugo/vars_withdeploy.go
new file mode 100644 (file)
index 0000000..88ce9a1
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2024 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//go:build withdeploy
+// +build withdeploy
+
+package hugo
+
+var IsWithdeploy = true
diff --git a/common/hugo/vars_withdeploy_off.go b/common/hugo/vars_withdeploy_off.go
new file mode 100644 (file)
index 0000000..9355680
--- /dev/null
@@ -0,0 +1,19 @@
+// Copyright 2024 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//go:build !withdeploy
+// +build !withdeploy
+
+package hugo
+
+var IsWithdeploy = false
index 6cabfdbb964ca1f9b9fc63690168b4c514abfe16..cf5988840696acd64a0fae41b18a3ac30447bd7f 100644 (file)
@@ -152,6 +152,9 @@ func BuildVersionString() string {
        if IsExtended {
                version += "+extended"
        }
+       if IsWithdeploy {
+               version += "+withdeploy"
+       }
 
        osArch := bi.GoOS + "/" + bi.GoArch