Repository navigation
Building the server
Admin Site version and the in-app changelog come from the running binary. If you go build without stamping a git tag, the process reports "dev" and the changelog is empty.
The git tag is the version. Nothing in source is bumped for a release.
Download the Linux or Windows server artifact from Releases. CI stamps -ldflags from the release tag. Those binaries do not need a .git directory.
You still need a built Vue UI for full mode (npm run build:web, or the web-dist-*.zip attached to the same release).
cd /path/to/ordryn
git fetch --tags # or: git fetch <remote> --tags
git describe --tags --abbrev=0 # must print vX.Y.Z
npm run build:web
make buildThat writes GoTodo (or GoTodo.exe on Windows) with -ldflags "-X GoTodo/internal/version.Version=…". Point your process manager at that file, or copy it wherever you keep the binary.
make run stamps the same way. Plain go run . does not; it then tries git describe from the process working directory.
Use this when you build as another user and write the binary out of the tree. Fetch tags before this command; a later git fetch does not change an already-built binary.
cd /path/to/ordryn
git fetch todo --tags # use your remote name
VERSION=$(git describe --tags --abbrev=0)
sudo -u webusr -H nice -n 19 /usr/local/go/bin/go build \
-buildvcs=false -p 1 \
-ldflags "-X GoTodo/internal/version.Version=${VERSION}" \
-o /var/www/gotodo-bin/gotodo-server \
.
sudo systemctl restart your-unit-buildvcs=false is fine if you pass -ldflags. Without -ldflags, Go leaves the default "dev". Runtime git describe only runs if the process working directory is a git checkout with tags; a systemd unit whose WorkingDirectory is /var/www/gotodo-bin will not see .git.
Stamp at compile time whenever the binary is copied away from the repo.
- In the source tree,
git describe --tags --abbrev=0printsvX.Y.Z(not empty, notfatal: No names found). - The build command includes
-ldflags "-X GoTodo/internal/version.Version=…". - systemd (or whatever runs the server) is using the binary you just built (
ExecStartmatches-o). - You restarted the unit after the rebuild.
Forks report their tags, not new tags from upstream, until you fetch or create tags on that clone.
Getting started
- Home
- Self-hosting
- Building-the-server
- Configuration
- Admin-settings
- Reverse-proxy
- Extensions
- Upgrading
Using the API
Help