@@ -9,6 +9,12 @@ Building Syncthing
9
9
of it. For all other purposes we recommend using the official binary
10
10
releases instead.
11
11
12
+ If you still prefer to build Syncthing from source for your own use, be
13
+ aware that there is a built-in automatic upgrade mechanism that will
14
+ overwrite your built binary with a downloaded version. To avoid this, you
15
+ can use the ``--no-upgrade `` build flag (see below), but you will be
16
+ responsible for your own upgrades.
17
+
12
18
Branches and Tags
13
19
-----------------
14
20
@@ -103,7 +109,7 @@ The following ``build.go`` subcommands and options exist.
103
109
``go run build.go build ``
104
110
Builds just the named target, or ``syncthing `` by default, to the current
105
111
directory. Use this when cross compiling, with parameters for what to cross
106
- compile to: ``go run build.go -goos linux -goarch 386 build ``.
112
+ compile to: ``go run build.go -- goos linux - -goarch 386 build ``.
107
113
108
114
``go run build.go test ``
109
115
Runs the tests.
@@ -120,13 +126,13 @@ The following ``build.go`` subcommands and options exist.
120
126
Creates a Syncthing zip dist file in the current directory. Assumes a
121
127
Windows build.
122
128
123
- The options ``-no-upgrade ``, ``-goos `` and ``-goarch `` can be given to
129
+ The options ``-- no-upgrade ``, ``-- goos `` and ``- -goarch `` can be given to
124
130
influence ``build ``, ``tar `` and ``zip ``. Examples:
125
131
126
- ``go run build.go -goos linux -goarch 386 tar ``
132
+ ``go run build.go -- goos linux - -goarch 386 tar ``
127
133
Builds a tar.gz distribution of Syncthing for linux-386.
128
134
129
- ``go run build.go -goos windows -no-upgrade zip ``
135
+ ``go run build.go -- goos windows - -no-upgrade zip ``
130
136
Builds a zip distribution of Syncthing for Windows (current architecture) with
131
137
upgrading disabled.
132
138
@@ -155,12 +161,12 @@ If the tarball is from our build server it contains a file called
155
161
``RELEASE `` that informs the build system of the version being
156
162
built. If you're building from a different source package, for example
157
163
one automatically generated by GitHub, you must instead pass the
158
- ``-version `` flag to ``build.go ``.
164
+ ``-- version `` flag to ``build.go ``.
159
165
160
166
If you are building something that will be installed as a package
161
- (Debian, RPM, ...) you almost certainly want to use ``-no-upgrade `` as
167
+ (Debian, RPM, ...) you almost certainly want to use ``-- no-upgrade `` as
162
168
well to prevent the built in upgrade system from being activated.
163
169
164
- ``go run build.go -version v0.10.26 -no-upgrade tar ``
170
+ ``go run build.go -- version v0.10.26 - -no-upgrade tar ``
165
171
Builds a tar.gz distribution of Syncthing for the current OS/arch, tagged as
166
172
``v0.10.26 ``, with upgrades disabled.
0 commit comments