-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rultor.yml
62 lines (62 loc) · 3 KB
/
.rultor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# The MIT License (MIT)
#
# Copyright (c) 2024 Aliaksei Bialiauski
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
---
architect:
- h1alexbel
docker:
image: h1alexbel/rultor-rust-image:0.0.4
assets:
credentials: l3r8yJ/home#assets/crates-credentials
install: |
rustup install nightly-x86_64-unknown-linux-gnu
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
sudo npm install @openapitools/[email protected] -g
cargo install cargo-machete
cargo install killport
export RULTOR=true
merge:
script: |
just rultor
release:
script: |-
[[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1
sed -i -e "s/^version = \"0.0.0\"/version = \"${tag}\"/" server/Cargo.toml
sed -i -e "s/^version = \"0.0.0\"/version = \"${tag}\"/" cli/Cargo.toml
sed -i -e "s/^fakehub-server = { path = \"..\/server\", version = \"0.0.0\" }/fakehub-server = { path = \"..\/server\", version = \"${tag}\" }/" cli/Cargo.toml
just gen
sed -i -e "s/^name = \"openapi\"/name = \"github-mirror\"/" github-mirror/Cargo.toml
sed -i -e "s/^version = \".*\"/version = \"${tag}\"/" github-mirror/Cargo.toml
sed -i -e "s/^openapi = { path = \"..\/github-mirror\", version = \"1.1.4\" }/github-mirror = { path = \"..\/github-mirror\", version = \"${tag}\" }/" server/Cargo.toml
sed -i -e "s/^fakehub-server = { path = \"..\/server\", version = \"${tag}\" }/fakehub-server = { path = \"..\/server\", version = \"${tag}\", features = [\"mirror_release\"] }/" cli/Cargo.toml
cargo build --features "mirror_release"
cargo --color=never test --features "mirror_release"
cargo +nightly fmt --check -- --color=never
cargo machete
cargo doc --no-deps --features "mirror_release"
cargo clippy --features "mirror_release"
git add .
git commit -am "${tag}"
ls -a ../
mkdir -p ~/.cargo && cp ../credentials ~/.cargo
cargo --color=never publish -p github-mirror
cargo --color=never publish -p fakehub-server --features "mirror_release"
cargo --color=never publish -p fakehub