Skip to content

Commit e9122a9

Browse files
aline version
1 parent d2d17d3 commit e9122a9

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

Jenkinsfile

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,26 @@ pipeline {
4646
env.versionTag = version
4747
echo "Using version from version-beta.conf: ${env.versionTag}"
4848
}
49-
sh '''
50-
pip install toml
49+
// sh """
50+
// sed -i -r "s/superclient/superclient-beta/g" pyproject.toml
51+
// """
52+
sh "sed -i \'s/version = \"[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\"/version = \"${env.versionTag}\"/g\' pyproject.toml"
53+
// sh """
54+
// C_INCLUDE_PATH=/usr/include/librdkafka LIBRARY_PATH=/usr/include/librdkafka /tmp/.local/bin/pdm build
55+
// """
56+
sh '''
57+
pip install toml
5158
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+
cat <<EOF > update_name.py
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+
EOF
5966
60-
python3 update_name.py
61-
'''
62-
sh "sed -i \'s/version = \"[0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\"/version = \"${env.versionTag}\"/g\' pyproject.toml"
67+
python3 update_name.py
68+
'''
6369
sh 'pip install build'
6470
sh 'python -m build'
6571
sh 'ls dist/'

0 commit comments

Comments
 (0)