summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoratanarjuat <atanarjuat@example.com>2022-07-31 01:47:34 -0400
committeratanarjuat <atanarjuat@example.com>2022-07-31 02:39:41 -0400
commit8bef66da80dca4ad085122948471b9c1b1be0ac6 (patch)
tree7d4cc6e2f5c16cff193ff550d1a4a8a6aa9d8f6b /scripts
parentdaad04f571c8f60500a38a98c87da262baa0361a (diff)
obfs4 ver check
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-go-modules.sh15
-rwxr-xr-xscripts/check-obfs4-ver.sh14
-rw-r--r--scripts/obfs4-version1
3 files changed, 15 insertions, 15 deletions
diff --git a/scripts/check-go-modules.sh b/scripts/check-go-modules.sh
deleted file mode 100755
index fa4b21c..0000000
--- a/scripts/check-go-modules.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/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
-
diff --git a/scripts/check-obfs4-ver.sh b/scripts/check-obfs4-ver.sh
new file mode 100755
index 0000000..cecb7e0
--- /dev/null
+++ b/scripts/check-obfs4-ver.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# check yawning's HEAD
+available=$(curl -s https://gitlab.com/api/v4/projects/10387781/repository/tags/ | jq ".[0]".name | cut -d "-" -f 2 | cut -d "\"" -f 1)
+current=$(cat scripts/obfs4-version)
+
+echo "current:" $current
+echo "available:" $available
+
+if [ "$available" = "$current" ]; then
+ exit 0
+else
+ echo "New version of upstream yawning/obfs4 available, should update deps."
+ exit 2
+fi;
diff --git a/scripts/obfs4-version b/scripts/obfs4-version
new file mode 100644
index 0000000..43b2961
--- /dev/null
+++ b/scripts/obfs4-version
@@ -0,0 +1 @@
+0.0.13