From 293b19995c06bf61bc6306d811ed019b8a80a5f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20F=C3=A9ron?= Date: Tue, 7 May 2024 09:29:24 +0200 Subject: [PATCH 1/2] Add CI job to check database update --- .github/workflows/check.yml | 22 ++++++++++++++++++++++ assets/update.sh | 1 + 2 files changed, 23 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..0da603a --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,22 @@ +name: Check +on: + pull_request: + paths: + - assets/** + +jobs: + check_database_update: + name: Check libphonenumber database update + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Update assets + run: ./assets/update.sh + - name: Check git status + run: | + if [[ -n "$(git status --porcelain=v2)" ]]; + then + echo "Found untracked or uncommitted files after updating the libphonenumber database, failing." + exit 1 + fi \ No newline at end of file diff --git a/assets/update.sh b/assets/update.sh index a7bee27..2e1c523 100755 --- a/assets/update.sh +++ b/assets/update.sh @@ -1,5 +1,6 @@ #!/bin/bash set -eu +cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd GIT_REF=v8.13.35 TMP_CLONE_DIR=$(mktemp -d) From a7e6f90576dd410279bea4404cd3e049bfc3b308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20F=C3=A9ron?= Date: Tue, 7 May 2024 09:34:49 +0200 Subject: [PATCH 2/2] Fix wrong bincode version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1c0d385..3867712 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ strum = { version = ">=0.24, <=0.26", features = ["derive"] } thiserror = "1.0" [build-dependencies] -bincode = "1.0.1" +bincode = "1.3" quick-xml = ">=0.28, <=0.31" regex = "1.10" serde = "1.0"