File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -46,16 +46,20 @@ pipeline {
4646 env. versionTag = version
4747 echo " Using version from version-beta.conf: ${ env.versionTag} "
4848 }
49- // sh """
50- // sed -i -r "s/superclient/superclient-beta/g" pyproject.toml
51- // """
52- sh """
53- sed -i -E 's/(^name *= *")superclient("/)/\1 superclient-beta\2 /' pyproject.toml
54- """
55- // sh "sed -i \'s/version = \"[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\"/version = \"${env.versionTag}\"/g\' pyproject.toml"
56- // sh """
57- // C_INCLUDE_PATH=/usr/include/librdkafka LIBRARY_PATH=/usr/include/librdkafka /tmp/.local/bin/pdm build
58- // """
49+ sh '''
50+ pip install toml
51+
52+ cat <<EOF > update_name.py
53+ import toml
54+ data = toml.load('pyproject.toml')
55+ data['project']['name'] = 'superclient-beta'
56+ with open('pyproject.toml', 'w') as f:
57+ toml.dump(data, f)
58+ EOF
59+
60+ python3 update_name.py
61+ '''
62+ sh " sed -i \' s/version = \" [0-9]\\ +\\ .[0-9]\\ +\\ .[0-9]\\ +\" /version = \" ${ env.versionTag} \" /g\' pyproject.toml"
5963 sh ' pip install build'
6064 sh ' python -m build'
6165 sh ' ls dist/'
You can’t perform that action at this time.
0 commit comments