diff --git a/CHANGELOG.md b/CHANGELOG.md index c38d1d9..37d2e78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file. +## 3.1.0 - 2026-03-03 + +### ⬆️ Upstream + +* **syncthing**: Bump to 2.0.15 + + * [Release notes](https://github.com/syncthing/syncthing/releases/tag/v2.0.15) + +### 🚀 Features + +* **scripts**: Fetch latest release from github api for syncthing + +### 🐛 Bug Fixes + +* **readme**: Incorrect image tags in README after a bump + ## 3.0.0 - 2026-02-28 ### ⬆️ Upstream diff --git a/Dockerfile b/Dockerfile index adbe127..46d12dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ ENV SYNCTHING_USER="syncthing" \ SYNCTHING_GROUP="syncthing" \ SYNCTHING_GROUP_GID=1000 \ SYNCTHING_ADMIN_USER="admin" \ - SYNCTHING_VERSION="2.0.14" \ + SYNCTHING_VERSION="2.0.15" \ SYNCTHING_ARCH="amd64" RUN set -x \ diff --git a/README.md b/README.md index 8008c0f..68341c9 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ Following arch are missing tests: ## Available image tags * [nventiveux/syncthing](https://hub.docker.com/r/nventiveux/syncthing) - * `latest`, `v2.0.14` ([Dockerfile](./Dockerfile)) + * Image version: `latest`, `3.1.0` ([Dockerfile](./Dockerfile)) + * Syncthing version: `v2.0.15` ## Usage @@ -109,8 +110,6 @@ Commit changes and submit a **Pull Request**. ### Releasing a new version -Update `SYNCTHING_VERSION` in `Taskfile.yml`. - Bump syncthing version using: ```sh diff --git a/Taskfile.yml b/Taskfile.yml index ceff779..13c111d 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -4,7 +4,6 @@ silent: true vars: DOCKER_IMAGE: "nventiveux/syncthing" - SYNCTHING_VERSION: "2.0.14" tasks: bump: @@ -15,12 +14,7 @@ tasks: bump:syncthing: desc: "Bump syncthing version" cmds: - - scripts/bump-syncthing.sh {{.SYNCTHING_VERSION}} - - build: - desc: "Build the docker image" - cmds: - - docker buildx bake build --set "*.tags=${DOCKER_IMAGE}:dev" + - scripts/bump-syncthing.sh preview-changelog: desc: "Preview next changelog" @@ -31,16 +25,15 @@ tasks: desc: "Create a new tag for this release" prompt: "You are about to create a new release. Continue ?" cmds: - - scripts/tag.sh {{.SYNCTHING_VERSION}} + - scripts/tag.sh - echo "Now, push commit with tags (git push origin --tags) to create the release." tests: desc: "Build and run the container for testing" - deps: [build] cmds: - - docker run -it --rm -p 8000:8384 --name syncthing_tests {{.DOCKER_IMAGE}}:dev + - docker run -it --rm -p 8000:8384 --name syncthing_tests {{.DOCKER_IMAGE}}:latest clean: desc: "Remove the local docker image" cmds: - - docker image rm {{.DOCKER_IMAGE}}:dev + - docker image rm {{.DOCKER_IMAGE}}:latest diff --git a/scripts/bump-syncthing.sh b/scripts/bump-syncthing.sh index d63ce33..25fcc0b 100755 --- a/scripts/bump-syncthing.sh +++ b/scripts/bump-syncthing.sh @@ -2,8 +2,6 @@ set -eu -next_version="${1:?Usage: $0 }" - # Checks if [[ -n $(git status --porcelain) ]] then @@ -11,9 +9,13 @@ then exit 1 fi +# get latest stable version for syncthing +next_version="$(curl -fsSL "https://api.github.com/repos/syncthing/syncthing/releases/latest" | jq -r '.tag_name | ltrimstr("v")')" +echo "Fetched latest stable version: ${next_version}" + # Bump all versions sed -i -r -e "s/SYNCTHING_VERSION=\".*\"/SYNCTHING_VERSION=\"${next_version}\"/" Dockerfile -sed -i -r -e "s/v[0-9]+\.[0-9]+\.[0-9]+/v${next_version}/" README.md +sed -i -r -e "s/(Syncthing version:.+)\`v[0-9]+\.[0-9]+\.[0-9]+\`/\1\`v${next_version}\`/" README.md # Prepare commit git add Dockerfile README.md diff --git a/scripts/bump.sh b/scripts/bump.sh index 45c02ab..ad7b243 100755 --- a/scripts/bump.sh +++ b/scripts/bump.sh @@ -11,7 +11,10 @@ then exit 1 fi +# Bump files +sed -i -r -e "s/(Image version:.+)\`[0-9]+\.[0-9]+\.[0-9]+\`/\1\`${next_version:1}\`/" README.md + # Prepare new changelog git cliff --bump --output CHANGELOG.md -git add CHANGELOG.md +git add CHANGELOG.md README.md git commit -m "chore(release): prepare for ${next_version}"