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

Restore getting goBackend version from go.mod #8

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ extension SettingsTableViewController {
}
cell.value = appVersion
}
// else if field == .goBackendVersion {
// cell.value = WIREGUARD_GO_VERSION
// }
else if field == .goBackendVersion {
cell.value = WIREGUARD_GO_VERSION
}
return cell
} else if field == .exportZipArchive {
let cell: ButtonCell = tableView.dequeueReusableCell(for: indexPath)
Expand Down
2 changes: 1 addition & 1 deletion Sources/WireGuardApp/UI/macOS/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ extension AppDelegate {
}
let appVersionString = [
tr(format: "macAppVersion (%@)", appVersion),
// tr(format: "macGoBackendVersion (%@)", WIREGUARD_GO_VERSION)
tr(format: "macGoBackendVersion (%@)", WIREGUARD_GO_VERSION)
].joined(separator: "\n")
NSApp.activate(ignoringOtherApps: true)
NSApp.orderFrontStandardAboutPanel(options: [
Expand Down
2 changes: 1 addition & 1 deletion Sources/WireGuardKitGo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ endef
$(foreach ARCH,$(ARCHS),$(eval $(call libwg-go-a,$(ARCH))))

$(DESTDIR)/wireguard-go-version.h: go.mod $(GOROOT)/.prepared
sed -E -n 's/.*golang\.zx2c4\.com\/wireguard +v[0-9.]+-[0-9]+-([0-9a-f]{8})[0-9a-f]{4}.*/#define WIREGUARD_GO_VERSION "\1"/p' "$<" > "$@"
sed -E -n 's/.*github\.com\/amnezia-vpn\/amneziawg-go +v([0-9.]+).*/#define WIREGUARD_GO_VERSION "\1"/p' "$<" > "$@"

$(DESTDIR)/libwg-go.a: $(foreach ARCH,$(ARCHS),$(BUILDDIR)/libwg-go-$(ARCH).a)
@mkdir -vp "$(DESTDIR)"
Expand Down
2 changes: 0 additions & 2 deletions WireGuard.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1758,7 +1758,6 @@
SWIFT_PRECOMPILE_BRIDGING_HEADER = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
WIREGUARD_GO_VERSION = 0.2.1;
};
name = Debug;
};
Expand Down Expand Up @@ -1825,7 +1824,6 @@
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
WIREGUARD_GO_VERSION = 0.2.1;
};
name = Release;
};
Expand Down