-
-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use same version number for web and desktop (#932)
With the new release process in place, I think keeping a separate version number for desktop is confusing and unnecessary. This PR remove it so the desktop version reports the version number of the web version embedded in the binary. ## Launch Checklist <!-- Thanks for the PR! Feel free to add or remove items from the checklist. --> - [x] Briefly describe the changes in this PR. - [x] Add an entry to `CHANGELOG.md` under the `## main` section.
- Loading branch information
1 parent
00f431c
commit d940c02
Showing
6 changed files
with
87 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,8 @@ public | |
|
||
# IDE | ||
.vscode/ | ||
.idea/ | ||
.idea/ | ||
|
||
# Window metadata files | ||
/desktop/winres/winres.json | ||
/desktop/*.syso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
SOURCEDIR=. | ||
SOURCES := $(shell find $(SOURCEDIR) -name '*.go') | ||
BINARY=maputnik | ||
DESKTOP_VERSION := 1.1.1 | ||
EDITOR_VERSION := $(shell node -p "require('../package.json').version") | ||
VERSION := $(shell node -p "require('../package.json').version") | ||
GOPATH := $(if $(GOPATH),$(GOPATH),$(HOME)/go) | ||
GOBIN := $(if $(GOBIN),$(GOBIN),$(HOME)/go/bin) | ||
|
||
all: $(BINARY) | ||
|
||
$(BINARY): $(GOBIN)/gox $(SOURCES) version.go rice-box.go | ||
$(BINARY): $(GOBIN)/gox $(GOBIN)/go-winres $(SOURCES) version.go rice-box.go winres/winres.json | ||
$(GOBIN)/go-winres make --product-version=$(VERSION) | ||
$(GOBIN)/gox -osarch "windows/amd64 linux/amd64 darwin/amd64" -output "bin/{{.OS}}/${BINARY}" | ||
|
||
winres/winres.json: winres/winres_template.json | ||
sed 's/{{.Version}}/$(VERSION)/g' winres/winres_template.json > $@ | ||
|
||
$(GOBIN)/go-winres: | ||
go install github.com/tc-hib/go-winres@latest | ||
|
||
# Copy the current release into ./editor/maputnik so it can be | ||
# embedded in the binary | ||
editor/pull_release: | ||
|
@@ -23,13 +29,12 @@ $(GOBIN)/gox: | |
$(GOBIN)/rice: | ||
go install github.com/GeertJohan/go.rice/[email protected] | ||
|
||
# Embed the current version numbers in the executable by writing version.go | ||
# Embed the current version number in the executable by writing version.go | ||
.PHONY: version.go | ||
version.go: | ||
@echo "// DO NOT EDIT: Autogenerated by Makefile\n" > version.go | ||
@echo "package main\n" >> version.go | ||
@echo "const DesktopVersion = \"$(DESKTOP_VERSION)\"" >> version.go | ||
@echo "const EditorVersion = \"$(EDITOR_VERSION)\"" >> version.go | ||
@echo "const Version = \"$(VERSION)\"" >> version.go | ||
|
||
rice-box.go: $(GOBIN)/rice editor/pull_release | ||
$(GOBIN)/rice embed-go | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"RT_GROUP_ICON": { | ||
"APP": { | ||
"0000": [ | ||
"../../src/img/maputnik.png" | ||
] | ||
} | ||
}, | ||
"RT_MANIFEST": { | ||
"#1": { | ||
"0409": { | ||
"identity": { | ||
"name": "Maputnik", | ||
"version": "{{.Version}}" | ||
}, | ||
"description": "A MapLibre GL visual style editor", | ||
"minimum-os": "win7", | ||
"execution-level": "as invoker", | ||
"ui-access": false, | ||
"auto-elevate": false, | ||
"dpi-awareness": "system", | ||
"disable-theming": false, | ||
"disable-window-filtering": false, | ||
"high-resolution-scrolling-aware": false, | ||
"ultra-high-resolution-scrolling-aware": false, | ||
"long-path-aware": false, | ||
"printer-driver-isolation": false, | ||
"gdi-scaling": false, | ||
"segment-heap": false, | ||
"use-common-controls-v6": false | ||
} | ||
} | ||
}, | ||
"RT_VERSION": { | ||
"#1": { | ||
"0000": { | ||
"fixed": { | ||
"file_version": "{{.Version}}", | ||
"product_version": "{{.Version}}" | ||
}, | ||
"info": { | ||
"0409": { | ||
"Comments": "https://github.com/maplibre/maputnik", | ||
"CompanyName": "Maputnik", | ||
"FileDescription": "A MapLibre GL visual style editor", | ||
"FileVersion": "{{.Version}}", | ||
"InternalName": "Maputnik", | ||
"LegalCopyright": "MIT License", | ||
"LegalTrademarks": "", | ||
"OriginalFilename": "Maputnik.exe", | ||
"PrivateBuild": "", | ||
"ProductName": "Maputnik", | ||
"ProductVersion": "{{.Version}}", | ||
"SpecialBuild": "" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |