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

chore(dev): warn from-source builders that syncthing auto-upgrades #882

Merged
merged 4 commits into from
Jan 6, 2025
Merged
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
20 changes: 13 additions & 7 deletions dev/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Building Syncthing
of it. For all other purposes we recommend using the official binary
releases instead.

If you still prefer to build Syncthing from source for your own use, be
aware that there is a built-in automatic upgrade mechanism that will
overwrite your built binary with a downloaded version. To avoid this, you
can use the ``--no-upgrade`` build flag (see below), but you will be
responsible for your own upgrades.

Branches and Tags
-----------------

Expand Down Expand Up @@ -103,7 +109,7 @@ The following ``build.go`` subcommands and options exist.
``go run build.go build``
Builds just the named target, or ``syncthing`` by default, to the current
directory. Use this when cross compiling, with parameters for what to cross
compile to: ``go run build.go -goos linux -goarch 386 build``.
compile to: ``go run build.go --goos linux --goarch 386 build``.

``go run build.go test``
Runs the tests.
Expand All @@ -120,13 +126,13 @@ The following ``build.go`` subcommands and options exist.
Creates a Syncthing zip dist file in the current directory. Assumes a
Windows build.

The options ``-no-upgrade``, ``-goos`` and ``-goarch`` can be given to
The options ``--no-upgrade``, ``--goos`` and ``--goarch`` can be given to
influence ``build``, ``tar`` and ``zip``. Examples:

``go run build.go -goos linux -goarch 386 tar``
``go run build.go --goos linux --goarch 386 tar``
Builds a tar.gz distribution of Syncthing for linux-386.

``go run build.go -goos windows -no-upgrade zip``
``go run build.go --goos windows --no-upgrade zip``
Builds a zip distribution of Syncthing for Windows (current architecture) with
upgrading disabled.

Expand Down Expand Up @@ -155,12 +161,12 @@ If the tarball is from our build server it contains a file called
``RELEASE`` that informs the build system of the version being
built. If you're building from a different source package, for example
one automatically generated by GitHub, you must instead pass the
``-version`` flag to ``build.go``.
``--version`` flag to ``build.go``.

If you are building something that will be installed as a package
(Debian, RPM, ...) you almost certainly want to use ``-no-upgrade`` as
(Debian, RPM, ...) you almost certainly want to use ``--no-upgrade`` as
well to prevent the built in upgrade system from being activated.

``go run build.go -version v0.10.26 -no-upgrade tar``
``go run build.go --version v0.10.26 --no-upgrade tar``
Builds a tar.gz distribution of Syncthing for the current OS/arch, tagged as
``v0.10.26``, with upgrades disabled.
Loading