Skip to content

Commit d2d17d3

Browse files
fix versioning
1 parent 5445622 commit d2d17d3

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

Jenkinsfile

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff 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("/)/\1superclient-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/'

0 commit comments

Comments
 (0)