diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-11-05 09:57:12 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-11-05 11:40:42 +0100 |
commit | ca4fc587c368e5a4f85a6514b9fd5e00153847ab (patch) | |
tree | 74be9ec26873af6510436e1df67f6c94bb366139 | |
parent | 4faaaf9c2ffb8ceab0630a66136da852d88e651f (diff) | |
download | hugo-ca4fc587c368e5a4f85a6514b9fd5e00153847ab.tar.gz hugo-ca4fc587c368e5a4f85a6514b9fd5e00153847ab.zip |
common/hugo: Add withdeploy to the version string printed in hugo version
-rw-r--r-- | common/hugo/vars_withdeploy.go | 19 | ||||
-rw-r--r-- | common/hugo/vars_withdeploy_off.go | 19 | ||||
-rw-r--r-- | common/hugo/version.go | 3 |
3 files changed, 41 insertions, 0 deletions
diff --git a/common/hugo/vars_withdeploy.go b/common/hugo/vars_withdeploy.go new file mode 100644 index 000000000..88ce9a1cd --- /dev/null +++ b/common/hugo/vars_withdeploy.go @@ -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 index 000000000..935568027 --- /dev/null +++ b/common/hugo/vars_withdeploy_off.go @@ -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 diff --git a/common/hugo/version.go b/common/hugo/version.go index 6cabfdbb9..cf5988840 100644 --- a/common/hugo/version.go +++ b/common/hugo/version.go @@ -152,6 +152,9 @@ func BuildVersionString() string { if IsExtended { version += "+extended" } + if IsWithdeploy { + version += "+withdeploy" + } osArch := bi.GoOS + "/" + bi.GoArch |