summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rwxr-xr-xscripts/check-go-modules.sh15
2 files changed, 17 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 7a7f8f3..8a356d1 100644
--- a/Makefile
+++ b/Makefile
@@ -43,3 +43,5 @@ build-android:
test:
go test ./...
+check-yawning-obfs4:
+ ./scripts/check-go-modules.sh
diff --git a/scripts/check-go-modules.sh b/scripts/check-go-modules.sh
new file mode 100755
index 0000000..fa4b21c
--- /dev/null
+++ b/scripts/check-go-modules.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+go get -u gitlab.com/yawning/obfs4.git &> /dev/null
+git --no-pager diff -U0 go.mod | grep -Fq "gitlab.com/yawning/obfs4.git"
+
+case "$?" in
+ "0")
+ echo "New version of upstream yawning/obfs4 available!!"
+ exit 2
+ ;;
+ *)
+ exit 0
+ ;;
+esac
+