Skip to content

Commit 57afedf

Browse files
authored
Merge branch 'develop' into jb/execpath
2 parents 3d45a91 + 902f327 commit 57afedf

File tree

11 files changed

+72
-30
lines changed

11 files changed

+72
-30
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build Syncthing macOS unnotarized Release DMG (On-Demand)
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-release-dmg:
8+
name: Build unnotarized Release DMG
9+
runs-on: macos-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Build release target
16+
run: |
17+
make release-dmg
18+
19+
- name: Archive artifacts
20+
uses: actions/upload-artifact@v4
21+
with:
22+
name: syncthing-macos-dmg-unnotarized
23+
path: Build/Products/Release/*.dmg

.github/workflows/build-syncthing-macos.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
if: github.event_name == 'push' && github.ref != 'refs/heads/release' # Debug not necessary on release branch (develop is intermediate branch)
2020
runs-on: macos-15
2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
2525

@@ -33,7 +33,7 @@ jobs:
3333
environment: signing
3434
runs-on: macos-15
3535
steps:
36-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
3737
with:
3838
fetch-depth: 0
3939
submodules: 'true'
@@ -68,7 +68,7 @@ jobs:
6868
make release-dmg
6969
7070
- name: Archive artifacts
71-
uses: actions/upload-artifact@v3
71+
uses: actions/upload-artifact@v4
7272
with:
7373
name: syncthing-macos-dmg-release
7474
path: Build/Products/Release/*.dmg
@@ -82,7 +82,7 @@ jobs:
8282
runs-on: macos-latest
8383
steps:
8484
- name: Download artifacts
85-
uses: actions/download-artifact@v3
85+
uses: actions/download-artifact@v4
8686
with:
8787
name: syncthing-macos-dmg-release
8888

.github/workflows/generate-appcast.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,22 @@ jobs:
1111
runs-on: ubuntu-latest
1212
environment: appcast
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515

1616
- name: Generate appcast.xml
1717
run: |
1818
cd cmd/ghreleases2appcast
1919
go run . -o ../../appcast.xml
2020
21-
- name: Push to Spaces
21+
- name: Push to object store
2222
uses: docker://docker.io/rclone/rclone:latest
2323
env:
24-
RCLONE_CONFIG_SPACES_TYPE: s3
25-
RCLONE_CONFIG_SPACES_PROVIDER: DigitalOcean
26-
RCLONE_CONFIG_SPACES_ACCESS_KEY_ID: ${{ secrets.SPACES_KEY }}
27-
RCLONE_CONFIG_SPACES_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET }}
28-
RCLONE_CONFIG_SPACES_ENDPOINT: ams3.digitaloceanspaces.com
29-
RCLONE_CONFIG_SPACES_ACL: public-read
24+
RCLONE_CONFIG_OBJSTORE_TYPE: s3
25+
RCLONE_CONFIG_OBJSTORE_PROVIDER: ${{ secrets.S3_PROVIDER }}
26+
RCLONE_CONFIG_OBJSTORE_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
27+
RCLONE_CONFIG_OBJSTORE_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
28+
RCLONE_CONFIG_OBJSTORE_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
29+
RCLONE_CONFIG_OBJSTORE_REGION: ${{ secrets.S3_REGION }}
30+
RCLONE_CONFIG_OBJSTORE_ACL: public-read
3031
with:
31-
args: copy appcast.xml spaces:syncthing-macos/appcast/
32+
args: copy appcast.xml objstore:syncthing-macos/appcast/

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ all: debug
22
debug:
33
xcodebuild -workspace "syncthing.xcworkspace" -derivedDataPath $(PWD) -configuration Debug -scheme Pods-syncthing
44
xcodebuild -workspace "syncthing.xcworkspace" -derivedDataPath $(PWD) -configuration Debug -scheme syncthing
5+
debug-dmg:
6+
xcodebuild -workspace "syncthing.xcworkspace" -derivedDataPath $(PWD) -configuration Debug -scheme Pods-syncthing
7+
xcodebuild -workspace "syncthing.xcworkspace" -derivedDataPath $(PWD) -configuration Debug -scheme syncthing-dmg
58
release:
69
xcodebuild -workspace "syncthing.xcworkspace" -derivedDataPath $(PWD) -configuration Release -scheme Pods-syncthing
710
xcodebuild -workspace "syncthing.xcworkspace" -derivedDataPath $(PWD) -configuration Release -scheme syncthing
811
release-dmg:
912
xcodebuild -workspace "syncthing.xcworkspace" -derivedDataPath $(PWD) -configuration Release -scheme Pods-syncthing
1013
xcodebuild -workspace "syncthing.xcworkspace" -derivedDataPath $(PWD) -configuration Release -scheme syncthing-dmg
1114
release-update:
12-
./cmd/update-release.py
15+
source ./venv/bin/activate && ./cmd/update-release.py
1316
clean:
1417
rm -Rf Build Index Logs ModuleCache.noindex info.plist

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,16 @@ See also the Apple Developer documentation at <https://developer.apple.com/docum
263263

264264
## Release management
265265

266+
Activate the Python virtual environment with `semver` module installed. E.g `source venv/bin/activate`.
267+
266268
To update the bundled syncthing the `make release-update` must be run from the main folder which does
267269
basicly these steps automatically:
268270
* Update `syncthing/Scripts/syncthing-resource.sh`, `SYNCTHING_VERSION`
269271
* Update `syncthing/Info.plist`
270-
* `CFBundleShortVersionString` (e.g `0.14.50-dev` or `0.14.50-1`)
271-
* `CFBundleVersion` (e.g `145000` or `145001`)
272-
* When the code is git pushed the Syncthing build server automatically builds debug and release targets
273-
* Manually download the release `.dmg` from [build.syncthing.net](https://build.syncthing.net/viewType.html?buildTypeId=SyncthingMacOS_BuildReleaseDmg) which is correctly signed and notarized
274-
* Manually create a github release with tag `v<major>.<minor>.<patch>-<bundle index>`
275-
* Run deployment of [appcast.xml](https://build.syncthing.net/viewType.html?buildTypeId=SyncthingMacOS_CreateAppcastXml). Which turns [github releases JSON into a Sparkle appcast.xml file](https://github.com/syncthing/syncthing-macos/tree/develop/cmd/ghreleases2appcast). (See also [Sparkle documentation](https://sparkle-project.org/documentation/))
272+
* `CFBundleShortVersionString`: User readable string (e.g `1.27.10-1`)
273+
* `CFBundleVersion`: Incrementing version counter (e.g `102701001` for `1.27.10-1`)
274+
275+
* When the git branch develop or release pushed to github the Github actions CI server automatically builds debug and release
276+
* Manually download the release `.dmg` from [github.com actions](https://github.com/syncthing/syncthing-macos/actions/workflows/build-syncthing-macos.yml) which is correctly signed and notarized
277+
* Manually [create a new Github release](https://github.com/syncthing/syncthing-macos/releases/new) with tag `v<major>.<minor>.<patch>-<bundle index>`
278+
* Run deployment of Sparkle updater [appcast.xml](https://github.com/syncthing/syncthing-macos/actions/workflows/generate-appcast.yml). Which turns [github releases JSON into a Sparkle appcast.xml file](https://github.com/syncthing/syncthing-macos/tree/develop/cmd/ghreleases2appcast). (See also [Sparkle documentation](https://sparkle-project.org/documentation/)) to push to users.

cmd/ghreleases2appcast/go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ go 1.21
44

55
require (
66
github.com/google/go-github v17.0.0+incompatible
7-
github.com/hashicorp/go-version v1.6.0
7+
github.com/hashicorp/go-version v1.7.0
88
github.com/russross/blackfriday/v2 v2.1.0
9-
golang.org/x/oauth2 v0.12.0
9+
golang.org/x/oauth2 v0.21.0
1010
)
1111

1212
require (
13-
github.com/golang/protobuf v1.5.3 // indirect
13+
github.com/golang/protobuf v1.5.4 // indirect
1414
github.com/google/go-querystring v1.1.0 // indirect
1515
google.golang.org/appengine v1.6.8 // indirect
16-
google.golang.org/protobuf v1.33.0 // indirect
16+
google.golang.org/protobuf v1.34.1 // indirect
1717
)

cmd/ghreleases2appcast/go.sum

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS
22
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
33
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
44
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
5+
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
6+
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
57
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
68
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
79
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
@@ -12,6 +14,8 @@ github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD
1214
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
1315
github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
1416
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
17+
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
18+
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
1519
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
1620
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
1721
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
@@ -23,6 +27,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
2327
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
2428
golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4=
2529
golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4=
30+
golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
31+
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
2632
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
2733
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
2834
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -47,3 +53,5 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
4753
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
4854
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
4955
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
56+
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
57+
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=

cmd/update-release.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from urllib.request import urlopen
1515
from string import Template
1616

17-
distVersion = 2
17+
distVersion = 1
1818
latest_url = "https://api.github.com/repos/syncthing/syncthing/releases/latest"
1919
infoPlist = 'syncthing/Info.plist'
2020
infoPlistTmpl = 'syncthing/Info.plist.tmpl'
@@ -72,3 +72,7 @@
7272
if line.startswith(linePrefix):
7373
line = '{}"{}"\n'.format(linePrefix, str(version))
7474
sys.stdout.write(line)
75+
76+
print(f"Found latest tag from github: {tag_name}")
77+
print(f"CFBundleShortVersionString={CFBundleShortVersionString}")
78+
print(f"CFBundleVersion={CFBundleVersion}")

syncthing/Info.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
<key>CFBundlePackageType</key>
2020
<string>APPL</string>
2121
<key>CFBundleShortVersionString</key>
22-
<string>1.27.7-2</string>
22+
<string>1.29.2-1</string>
2323
<key>CFBundleVersion</key>
24-
<string>102700702</string>
24+
<string>102900201</string>
2525
<key>LSApplicationCategoryType</key>
2626
<string>public.app-category.utilities</string>
2727
<key>LSMinimumSystemVersion</key>
2828
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
2929
<key>LSUIElement</key>
30-
<true/>
30+
<string>1</string>
3131
<key>NSAppTransportSecurity</key>
3232
<dict>
3333
<key>NSAllowsArbitraryLoads</key>

syncthing/Info.plist.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<key>LSMinimumSystemVersion</key>
2828
<string>$$(MACOSX_DEPLOYMENT_TARGET)</string>
2929
<key>LSUIElement</key>
30-
<true/>
30+
<string>1</string>
3131
<key>NSAppTransportSecurity</key>
3232
<dict>
3333
<key>NSAllowsArbitraryLoads</key>

0 commit comments

Comments
 (0)