Skip to content

Commit 5445622

Browse files
add sed
1 parent 5bb9b52 commit 5445622

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

Jenkinsfile

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,14 @@ pipeline {
4949
// sh """
5050
// sed -i -r "s/superclient/superclient-beta/g" pyproject.toml
5151
// """
52+
sh """
53+
sed -i -E 's/(^name *= *")superclient("/)/\1superclient-beta\2/' pyproject.toml
54+
"""
5255
// sh "sed -i \'s/version = \"[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\"/version = \"${env.versionTag}\"/g\' pyproject.toml"
5356
// sh """
5457
// C_INCLUDE_PATH=/usr/include/librdkafka LIBRARY_PATH=/usr/include/librdkafka /tmp/.local/bin/pdm build
5558
// """
56-
sh 'pip install build'
57-
sh '''
58-
pip install toml
59-
python -c "
60-
import toml
61-
data = toml.load('pyproject.toml')
62-
data['project']['name'] = 'superclient-beta'
63-
with open('pyproject.toml', 'w') as f:
64-
toml.dump(data, f)
65-
"
66-
'''
59+
sh 'pip install build'
6760
sh 'python -m build'
6861
sh 'ls dist/'
6962
// withCredentials([usernamePassword(credentialsId: 'superstream-pypi', usernameVariable: 'USR', passwordVariable: 'PSW')]) {

0 commit comments

Comments
 (0)