aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorLena <lena@omega>2026-07-01 00:00:00 +0000
committerLena <lena@omega>2026-07-01 00:00:00 +0000
commit80a4a209d63e55ff09c7f31b59358bfe56b055b4 (patch)
tree612799ea46cdb45f7ab2d0f7c9d288f7b8da3221 /ci
parentf8253eace9d231b276024dd66406d890c1d954e1 (diff)
downloadrsend-80a4a209d63e55ff09c7f31b59358bfe56b055b4.tar.gz
ci: fail when gradle pins drift from versions
The gradle files and go.mod repeat pins from versions because gradle cannot source a shell file. Compare them in ci/test.sh so a bump that misses a copy fails loud instead of silently building with the old version.
Diffstat (limited to 'ci')
-rwxr-xr-xci/test.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/ci/test.sh b/ci/test.sh
index 8e8a3a4..5c141e5 100755
--- a/ci/test.sh
+++ b/ci/test.sh
@@ -12,6 +12,20 @@ if [ -f "$root/rsync/rsync-${RSYNC_VERSION}.tar.gz" ]; then
( cd "$root/rsync" && sha256sum -c "rsync-${RSYNC_VERSION}.tar.gz.sha256" )
fi
+# The gradle files and go.mod repeat pins from ./versions (gradle cannot source
+# a shell file); fail loud if they drift.
+echo "ci: version pins"
+pin() {
+ grep -q "$2" "$root/$1" || { echo "ci: $1 does not pin '$2' (see versions)" >&2; exit 1; }
+}
+pin build.gradle "version '${AGP_VERSION}'"
+pin build.gradle "version '${KOTLIN_VERSION}'"
+pin gradle/wrapper/gradle-wrapper.properties "gradle-${GRADLE_VERSION}-bin.zip"
+pin app/build.gradle "compileSdk ${ANDROID_PLATFORM}"
+pin app/build.gradle "minSdk ${ANDROID_MIN_SDK}"
+pin app/build.gradle "targetSdk ${ANDROID_TARGET_SDK}"
+pin rsh/go.mod "^go ${GO_VERSION}"
+
echo "ci: gofmt"
unformatted=$(gofmt -l "$root/rsh")
if [ -n "$unformatted" ]; then