Add version verification
This commit is contained in:
parent
690cc5e1e6
commit
26143ad733
12
.github/verify_version.sh
vendored
Executable file
12
.github/verify_version.sh
vendored
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
QBITTORRENT_WEB_API_VERSION="$(cat Cargo.toml | grep version | head -1 | sed 's/version = //' | sed 's/"//g')"
|
||||||
|
QBITTORRENT_WEB_API_GEN_VERSION="$(cat qbittorrent-web-api-gen/Cargo.toml | grep version | head -1 | sed 's/version = //' | sed 's/"//g')"
|
||||||
|
|
||||||
|
if [ $QBITTORRENT_WEB_API_VERSION != $QBITTORRENT_WEB_API_GEN_VERSION ]
|
||||||
|
then
|
||||||
|
printf "Version mismatch, QBITTORRENT_WEB_API_VERSION=${QBITTORRENT_WEB_API_VERSION} and QBITTORRENT_WEB_API_GEN_VERSION=${QBITTORRENT_WEB_API_GEN_VERSION} (they must match)" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
|
@ -7,11 +7,17 @@ jobs:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Verify version
|
||||||
|
run: ./.github/verify_version.sh
|
||||||
|
|
||||||
- name: Install latest stable
|
- name: Install latest stable
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: Extract
|
||||||
|
|
||||||
- name: Login
|
- name: Login
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
@ -29,8 +35,4 @@ jobs:
|
||||||
with:
|
with:
|
||||||
command: publish
|
command: publish
|
||||||
|
|
||||||
# - name: Publish qbittorrent-web-api
|
|
||||||
# uses: actions-rs/cargo@v1
|
|
||||||
# with:
|
|
||||||
# command: publish
|
|
||||||
|
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -545,7 +545,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "qbittorrent-web-api"
|
name = "qbittorrent-web-api"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"qbittorrent-web-api-gen",
|
"qbittorrent-web-api-gen",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "qbittorrent-web-api"
|
name = "qbittorrent-web-api"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license-file = "LICENSE"
|
license-file = "LICENSE"
|
||||||
keywords = ["qbittorrent"]
|
keywords = ["qbittorrent"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user