Fix: pre-commit and tox issues
[releng/builder.git] / scripts / bump_mri_versions / readme.md
1 <!--
2 # Copyright (c) 2023 PANTHEON.tech s.r.o. All rights reserved.
3 # This program and the accompanying materials are available under the
4 # terms of the Eclipse Public License v1.0 which accompanies this
5 # distribution, and is available at
6 # http://www.eclipse.org/legal/epl-v10.html
7 -->
8
9 # Bumping MRI versions tool
10
11 This program is making versions changes in pom.xml files. For example 10.0.1
12 to 10.0.2. The change will apply if groupId.text contain "org.opendaylight".
13 This program is also making changes in feature.xml files. For example
14 [0.16,1) to [0.17,1)
15
16 ## Installing
17
18 _Prerequisite:_
19
20 - Python 3.8+
21
22 GET THE CODE:
23
24 USING HTTPS:
25 git clone "https://git.opendaylight.org/gerrit/releng/builder"
26
27 USING SSH:
28 git clone "ssh://{USERNAME}@git.opendaylight.org:29418/releng/builder"
29
30 NAVIGATE TO:
31 cd ~/builder/scripts/bump_mri_versions
32
33 INSTALL VIRTUAL ENVIROMENT PACKAGE:
34 sudo apt install python3-virtualenv
35
36 CREATE NEW VIRTUAL ENVIROMENT:
37 virtualenv venv
38
39 ACTIVATE VIRTUAL ENVIROMENT:
40 . venv/bin/activate
41
42 INSTALL LIBRARIES:
43 pip install requests bs4 lxml
44
45 SET FOLDER FOR TESTING:
46 clone repo for version updating in ~/builder/scripts/bump_mri_versions/repos or
47 update "bumping_dir" variable in python_lib.py file
48
49 ## Running
50
51 RUN: python main.py
52
53 ## Logs
54
55 PRINT:
56 All changes will be output to the console.
57
58     examples here:
59
60     XML FILE: repos/aaa/features/odl-aaa-api/pom.xml
61     ('groupId:', 'org.opendaylight.mdsal', 'ARTIFACT ID:', 'odl-mdsal-binding-base', 'VERSION:', '11.0.1', 'NEW VERSION:', '11.0.2')
62     ****************************************************************************************************
63
64     XML FILE: repos/ovsdb/southbound/southbound-features/odl-ovsdb-southbound-impl/src/main/feature/feature.xml
65     ('path:', PosixPath('repos/ovsdb/southbound/southbound-features/odl-ovsdb-southbound-impl/src/main/feature/feature.xml'), 'VERSION:', '[4,5)', 'NEW VERSION:', '[5,6)')
66     ****************************************************************************************************