-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rultor.yml
65 lines (65 loc) · 2.83 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
63
64
65
# 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: yegor256/rultor-image:1.23.1
assets:
docker-password: h1alexbel/home#assets/docker-password
pypi.txt: h1alexbel/home#assets/pypi.txt
install: |
rustup update
cargo install --version 1.30.1 just
curl -sSL https://install.python-poetry.org | python3 - --version 1.8.4
export PATH="$HOME/.local/bin:$PATH"
export RULTOR=true
poetry install
just install
merge:
script: |
poetry install --no-root
just test "deep or fast"
just check
# @todo #324:45min Package and publish sr cli in docker registry.
# Currently, we are only releasing toolchain in PyPi. Let's return back
# our docker pipeline, but instead of sr-data and justfile scripts, we should use
# sr cli. Don't forget to return `.github/workflows/docker.yml`.
# repo=h1alexbel/sr-detection
# sed -i -e "s/^0.0.0/${tag}/" Dockerfile
# sudo docker build "$(pwd)" --tag "${repo}:${tag}"
# sudo docker tag "${repo}:${tag}" "${repo}:latest"
# cat ../docker-password | sudo docker login --password-stdin --username h1alexbel
# sudo docker push "${repo}:${tag}"
# sudo docker push "${repo}:latest"
release:
pre: false
script: |-
[[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1
poetry config pypi-token.pypi $(cat ../pypi.txt)
sed -i "s/version = \"0\.0\.0\"/version = \"${tag}\"/g" pyproject.toml
sed -i "s/version = \"0\.0\.0\"/version = \"${tag}\"/g" sr-data/pyproject.toml
cd sr-data && poetry build && poetry publish --no-interaction && cd ..
sed -i "s/version = \"0\.0\.0\"/version = \"${tag}\"/g" sr-filter/pyproject.toml
sed -i "s/sr-data = \"0\.0\.0\"/sr-data = \"${tag}\"/g" sr-filter/pyproject.toml
git commit -am "${tag}"
cd sr-filter && poetry build && poetry publish --no-interaction