File tree Expand file tree Collapse file tree 6 files changed +25
-6
lines changed Expand file tree Collapse file tree 6 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 17
17
run : |
18
18
sudo echo "127.0.0.1 local.aikido.io" | sudo tee -a /etc/hosts
19
19
- name : Installation
20
- run : make install
20
+ run : make dev_install
21
21
- name : Run Pylint
22
22
run : |
23
23
poetry run pylint --fail-under=9 --rcfile=.pylintrc aikido_zen/
48
48
- uses : actions/checkout@v4
49
49
- name : Install poetry
50
50
run : pip install poetry
51
+ - name : Set the version for this release
52
+ run : |
53
+ TAG_NAME=${GITHUB_REF##*/}
54
+ make replace_version version=${TAG_NAME#v}
51
55
- name : Download binaries & build
52
56
run : make build
53
57
- name : Publish to PyPI
Original file line number Diff line number Diff line change 18
18
run : |
19
19
sudo echo "127.0.0.1 local.aikido.io" | sudo tee -a /etc/hosts
20
20
- name : Installation
21
- run : make install
21
+ run : make dev_install
22
22
- name : Run Pylint
23
23
run : |
24
24
poetry run pylint --fail-under=9 --rcfile=.pylintrc aikido_zen/
49
49
- uses : actions/checkout@v4
50
50
- name : Install poetry
51
51
run : pip install poetry
52
+ - name : Set the version for this release
53
+ run : |
54
+ TAG_NAME=${GITHUB_REF##*/}
55
+ make replace_version version=${TAG_NAME#dev-v}
52
56
- name : Install dependencies
53
57
run : poetry install
54
58
- name : Download binaries & build
Original file line number Diff line number Diff line change @@ -71,3 +71,16 @@ check_binaries:
71
71
echo "Directory $(CACHE_DIR) is empty. Running 'make binaries'..."; \
72
72
$(MAKE) binaries; \
73
73
fi
74
+
75
+
76
+ # Replace version number automatically on publish :
77
+ VERSION_FILES = ./build.gradle ./agent_api/src/main/java/dev/aikido/agent_api/Config.java
78
+ replace_version :
79
+ @if [ -z " $( version) " ]; then \
80
+ echo " Error: No version specified. Use 'make replace_version version=<new_version>'." ; \
81
+ exit 1; \
82
+ fi ;
83
+
84
+ poetry version $(version)
85
+ sed -i.bak "s/1.0-REPLACE-VERSION/$$version/g" aikido_zen/config.py
86
+ rm aikido_zen/config.py.bak
Original file line number Diff line number Diff line change 1
1
"""Contains package versions"""
2
2
3
- PKG_VERSION = "1.1.1 "
3
+ PKG_VERSION = "1.0-REPLACE-VERSION "
Original file line number Diff line number Diff line change 1
- from lib2to3 .fixes .fix_input import context
2
-
3
1
import pytest
4
2
5
3
from . import current_context , Context
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " aikido_zen"
3
- version = " 1.1.1 "
3
+ version = " 1.0.0 "
4
4
description = " Aikido Zen for Python"
5
5
authors = [
" Aikido Security <[email protected] >" ]
6
6
readme = " README.md"
You can’t perform that action at this time.
0 commit comments