From 7f034ab97b725e55297ff81f4307a082110fca94 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Mon, 26 Apr 2021 14:07:09 +0200 Subject: [PATCH] chore: update DBs and change versioning scheme We need a semver based versioning scheme otherwise it's not smooth to automatically upgrade using `go get -u -v ./...` in the github.com/ooni/probe-cli package. --- VERSION | 1 + build.sh | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +2 diff --git a/build.sh b/build.sh index 08831af..b942c60 100755 --- a/build.sh +++ b/build.sh @@ -8,10 +8,10 @@ set -e # Regarding the country database, you SHOULD check if a new version # is available, update the URL and the sha1sum (they don't provide # anything better than SHA1, so I guess we have to live with it). -country_db_url=https://download.db-ip.com/free/dbip-country-lite-2021-03.mmdb.gz -country_db_sha1sum=35ca83d9210ca48696918a12f1d24d22754f803a -asn_db_url=https://github.com/ooni/asn-db-generator/releases/download/20210331153739/asn.mmdb.gz -asn_db_sha256sum=8705e2afa2b8422cf54fedd707597a06e2737516a5ca72179b37bc717963b21b +country_db_url=https://download.db-ip.com/free/dbip-country-lite-2021-04.mmdb.gz +country_db_sha1sum=91804a84a3962ce16adfa00ef22463626b5db295 +asn_db_url=https://github.com/ooni/asn-db-generator/releases/download/20210426113524/asn.mmdb.gz +asn_db_sha256sum=cb8ccecf45c2fe6b7ff7d027399d6fdc337e6bff7da9cd0c0bced83d32db5f8e # Make sure you are in the master branch of the repository. if [ "`git branch --show-current`" != "master" ]; then @@ -53,16 +53,17 @@ gunzip -k $asn_db_gzfile go test -v ./... # Instructions to make a release. -version=`date +%Y%m%d%H%M%S` +version=`cat VERSION` +version=$(($version + 1)) +echo $version > VERSION echo "Now you should run the following commands:" echo "" -echo "- git checkout -b vendor-$version" +echo "- git checkout -b vendor-0.$version.0" echo "- git add assets/*.mmdb" -echo "- git commit -am \"Release $version\"" -echo "- git push origin vendor-$version" +echo "- git commit -am \"Release 0.$version.0\"" +echo "- git push origin vendor-0.$version.0" echo "" echo "For updating, you need to go in github.com/ooni/probe-cli and run:" echo "" -echo "- go get -v github.com/ooni/probe-assets@HEAD" +echo "- go get -v github.com/ooni/probe-assets@0.$version.0" echo "" -echo "Where HEAD is the latest commit in the vendor-$version branch."