Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix daemon client build ldflags values #1504

Merged
merged 2 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ unlink_libsodium:

build_client:
cd cmd/daemonclient && \
go build -o ../../bin/walg-daemon-client -ldflags "-s -w -X github.com/wal-g/wal-g/cmd/walg-daemon-client.buildDate=`date -u +%Y.%m.%d_%H:%M:%S` -X github.com/wal-g/wal-g/cmd/walg-daemon-client.gitRevision=`git rev-parse --short HEAD` -X github.com/wal-g/wal-g/cmd/walg-daemon-client.version=`git tag -l --points-at HEAD`"
go build -o ../../bin/walg-daemon-client -ldflags "-s -w -X main.buildDate=`date -u +%Y.%m.%d_%H:%M:%S` -X main.gitRevision=`git rev-parse --short HEAD` -X main.version=`git tag -l --points-at HEAD`"
2 changes: 1 addition & 1 deletion cmd/daemonclient/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func main() {
}

if len(os.Args) > 1 && strings.ToLower(os.Args[1]) == "--version" {
fmt.Println(strings.Join([]string{version, gitRevision, buildDate}, "\t"))
fmt.Println(strings.Join([]string{"walg-daemon-client", version, gitRevision, buildDate}, "\t"))
return
}

Expand Down
3 changes: 3 additions & 0 deletions docker/pg_tests/scripts/tests/daemon_client_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export SKIP_TEST_WAL_OVERWRITES="1"
. /tmp/tests/test_functions/daemon_patch.sh
. /tmp/tests/test_functions/daemon_client_patch.sh

# show client version
walg-daemon-client --version

prepare_config "/tmp/configs/full_backup_test_config.json"
start_daemon
test_full_backup "${TMP_CONFIG}"