mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
Patch the version and git commit into the scripts so that we don't need
|
|
to check out a git clone.
|
|
--- buildscript/build.go.orig 2024-07-24 13:35:27.000000000 -0500
|
|
+++ buildscript/build.go 2024-07-25 03:31:03.000000000 -0500
|
|
@@ -10,7 +10,6 @@
|
|
"regexp"
|
|
"strings"
|
|
|
|
- "github.com/craiggwilson/goke/pkg/git"
|
|
"github.com/craiggwilson/goke/pkg/sh"
|
|
"github.com/craiggwilson/goke/task"
|
|
"github.com/mongodb/mongo-tools/common/testtype"
|
|
@@ -200,7 +199,7 @@
|
|
return "", fmt.Errorf("failed to get current version: %w", err)
|
|
}
|
|
|
|
- gitCommit, err := git.SHA1(ctx)
|
|
+ gitCommit, err := "@GIT_COMMIT@", error(nil)
|
|
if err != nil {
|
|
return "", fmt.Errorf("failed to get git commit hash: %w", err)
|
|
}
|
|
--- release/version/version.go.orig 2024-07-24 13:35:27.000000000 -0500
|
|
+++ release/version/version.go 2024-07-25 03:32:38.000000000 -0500
|
|
@@ -54,12 +54,12 @@
|
|
var tagRE = regexp.MustCompile(`^\d+\.\d+\.\d+$`)
|
|
|
|
func GetCurrent() (Version, error) {
|
|
- commit, err := git("rev-parse", "HEAD")
|
|
+ commit, err := "@GIT_COMMIT@", error(nil)
|
|
if err != nil {
|
|
return Version{}, fmt.Errorf("git rev-parse HEAD failed: %w", err)
|
|
}
|
|
|
|
- desc, err := git("describe")
|
|
+ desc, err := "@VERSION@", error(nil)
|
|
if err != nil {
|
|
return Version{}, fmt.Errorf("git describe failed: %w", err)
|
|
}
|