File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ CONF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2121
2222build_docs=0
2323build_docker=0
24+ offline=0
2425
2526. " ${CONF_DIR} /env.sh"
2627
@@ -32,6 +33,9 @@ while [[ $# -ne 0 ]]; do
3233 docker)
3334 build_docker=1
3435 ;;
36+ offline)
37+ offline=1
38+ ;;
3539 * )
3640 ;;
3741 esac
4145echo " ======= FORMATTING CODE ========="
4246ruff format
4347echo " ======= BUILDING PACKAGE ========="
44- rm -rf " ${ROOT_DIR} /build/lib/sonar" " ${ROOT_DIR} /build/lib/cli" " ${ROOT_DIR} " /build/scripts* /sonar-tools " ${ROOT_DIR} " /dist/sonar_tools*
45- # python -m build
46- poetry build
48+ if [[ " ${offline} " = " 1" ]]; then
49+ cp " ${ROOT_DIR} /conf/offline/setup.py" " ${ROOT_DIR} /"
50+ cp " ${ROOT_DIR} /conf/offline/sonar-tools" " ${ROOT_DIR} /"
51+ mv " ${ROOT_DIR} /pyproject.toml" " ${ROOT_DIR} /pyproject.toml.bak"
52+ python setup.py bdist_wheel
53+ mv " ${ROOT_DIR} /pyproject.toml.bak" " ${ROOT_DIR} /pyproject.toml"
54+ rm " ${ROOT_DIR} /setup.py" " ${ROOT_DIR} /sonar-tools" " ${ROOT_DIR} /sonar_tools.egg-info"
55+ # python -m build
56+ else
57+ rm -rf " ${ROOT_DIR} /build/lib/sonar" " ${ROOT_DIR} /build/lib/cli" " ${ROOT_DIR} " /build/scripts* /sonar-tools " ${ROOT_DIR} " /dist/sonar_tools*
58+ poetry build
59+ fi
4760
4861if [[ " ${build_docs} " = " 1" ]]; then
4962 echo " ======= BUILDING DOCS ========="
You can’t perform that action at this time.
0 commit comments