Skip to content

Commit

Permalink
common/hugo: Add withdeploy to the version string printed in hugo ver…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
bep committed Nov 5, 2024
1 parent 4c0042d commit 0747c67
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
19 changes: 19 additions & 0 deletions common/hugo/vars_withdeploy.go
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions common/hugo/vars_withdeploy_off.go
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions common/hugo/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ func BuildVersionString() string {
if IsExtended {
version += "+extended"
}
if IsWithdeploy {
version += "+withdeploy"
}

osArch := bi.GoOS + "/" + bi.GoArch

Expand Down

0 comments on commit 0747c67

Please sign in to comment.