mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 20:47:01 +01:00
CI update all kanidm component version and tag
Add make entry to have all cargo versions updated from VERSION file. Add `tag_version` github action to update all cargo.toml and tag it and push it. Remove cargo fmt check from CI because we have problems with different versions and fails continually. Instead, we use cargo-husky to ensure that all people run it automatically in its local, but this is not obligatory. Update to version 1.0.0-rc10, according to packages published. In future cargo will support managing all dependencies from main Cargo.toml. Ref: https://github.com/rust-lang/cargo/issues/3931 Resolve #225
This commit is contained in:
parent
ff8711592e
commit
2670b6ae83
16
.github/workflows/rust.yml
vendored
16
.github/workflows/rust.yml
vendored
|
@ -4,22 +4,8 @@ name: Rust
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fmt:
|
# TODO clippy
|
||||||
name: Rustfmt
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Install stable toolchain
|
|
||||||
uses: actions-rs/toolchain@v1.0.6
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
components: rustfmt
|
|
||||||
|
|
||||||
- name: Run cargo fmt
|
|
||||||
run: cargo fmt --all -- --check
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
36
.github/workflows/tag_version.yml
vendored
Normal file
36
.github/workflows/tag_version.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
name: tag and version
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Commit files
|
||||||
|
id: commit
|
||||||
|
run: |
|
||||||
|
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
||||||
|
if git diff --exit-code $(git describe --tags --abbrev=0 HEAD)..HEAD -- VERSION;
|
||||||
|
then exit 0;
|
||||||
|
fi
|
||||||
|
make update-version
|
||||||
|
git add .
|
||||||
|
git config --local user.email "action@github.com"
|
||||||
|
git config --local user.name "GitHub Action"
|
||||||
|
VERSION=$(cat VERSION)
|
||||||
|
git commit -m "v${VERSION}"
|
||||||
|
git tag "v${VERSION}"
|
||||||
|
echo ::set-output name=PUSH::true
|
||||||
|
- name: Push changes
|
||||||
|
uses: ad-m/github-push-action@master
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
tags: true
|
||||||
|
if: ${{ steps.commit.outputs.PUSH }}
|
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -552,6 +552,11 @@ dependencies = [
|
||||||
"bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cargo-husky"
|
||||||
|
version = "1.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cast"
|
name = "cast"
|
||||||
version = "0.2.3"
|
version = "0.2.3"
|
||||||
|
@ -1371,6 +1376,7 @@ dependencies = [
|
||||||
"actix-session 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix-session 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"actix-web 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"actix-web 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"base64 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"base64 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"cargo-husky 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"concread 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
"concread 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"cookie 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cookie 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -3132,6 +3138,7 @@ dependencies = [
|
||||||
"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
|
"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
|
||||||
"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1"
|
"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1"
|
||||||
"checksum bytestring 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fc7c05fa5172da78a62d9949d662d2ac89d4cc7355d7b49adee5163f1fb3f363"
|
"checksum bytestring 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fc7c05fa5172da78a62d9949d662d2ac89d4cc7355d7b49adee5163f1fb3f363"
|
||||||
|
"checksum cargo-husky 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b02b629252fe8ef6460461409564e2c21d0c8e77e0944f3d189ff06c4e932ad"
|
||||||
"checksum cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0"
|
"checksum cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0"
|
||||||
"checksum cc 1.0.52 (registry+https://github.com/rust-lang/crates.io-index)" = "c3d87b23d6a92cd03af510a5ade527033f6aa6fa92161e2d5863a907d4c5e31d"
|
"checksum cc 1.0.52 (registry+https://github.com/rust-lang/crates.io-index)" = "c3d87b23d6a92cd03af510a5ade527033f6aa6fa92161e2d5863a907d4c5e31d"
|
||||||
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -49,3 +49,8 @@ install-tools:
|
||||||
prep:
|
prep:
|
||||||
cargo outdated -R
|
cargo outdated -R
|
||||||
cargo audit
|
cargo audit
|
||||||
|
|
||||||
|
update-version: ## update version form VERSION file in all Cargo.toml manifests
|
||||||
|
update-version: */Cargo.toml
|
||||||
|
@VERSION=`cat VERSION`; sed -i "0,/^version\ \= .*$$/{s//version = \"$$VERSION\"/}" */Cargo.toml
|
||||||
|
@echo updated to version "`cat VERSION`" cargo files
|
||||||
|
|
|
@ -23,5 +23,5 @@ uuid = { version = "0.8", features = ["serde", "v4"] }
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio = "0.2"
|
tokio = "0.2"
|
||||||
actix = "0.9"
|
actix = "0.9"
|
||||||
kanidm = { path = "../kanidmd", version = "0.1" }
|
kanidm = { path = "../kanidmd" }
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
|
|
|
@ -42,7 +42,7 @@ path = "src/test_auth.rs"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
kanidm_client = { path = "../kanidm_client", version = "0.1" }
|
kanidm_client = { path = "../kanidm_client", version = "0.1" }
|
||||||
kanidm_proto = { path = "../kanidm_proto", version = "0.1" }
|
kanidm_proto = { path = "../kanidm_proto", version = "0.1" }
|
||||||
kanidm = { path = "../kanidmd" }
|
kanidm = { path = "../kanidmd", version = "0.1" }
|
||||||
toml = "0.5"
|
toml = "0.5"
|
||||||
rpassword = "4.0"
|
rpassword = "4.0"
|
||||||
tokio = { version = "0.2", features=["full"] }
|
tokio = { version = "0.2", features=["full"] }
|
||||||
|
@ -69,5 +69,5 @@ reqwest = { version = "0.10" }
|
||||||
default = [ "libsqlite3-sys/bundled" ]
|
default = [ "libsqlite3-sys/bundled" ]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
kanidm = { path = "../kanidmd", version = "0.1" }
|
kanidm = { path = "../kanidmd" }
|
||||||
actix = "0.9"
|
actix = "0.9"
|
||||||
|
|
|
@ -79,3 +79,7 @@ default = [ "libsqlite3-sys/bundled", "openssl/vendored" ]
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
criterion = "0.3"
|
criterion = "0.3"
|
||||||
|
|
||||||
|
[dev-dependencies.cargo-husky]
|
||||||
|
version = "1"
|
||||||
|
default-features = false # Disable features which are enabled by default
|
||||||
|
features = ["precommit-hook", "run-cargo-fmt"]
|
||||||
|
|
Loading…
Reference in a new issue