Skip to content

Commit a7133df

Browse files
committedMar 3, 2023
release.pl: handle apostrophe in release name and keep source ts file
1 parent 08c7d66 commit a7133df

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed
 

‎cmake/CreateQgsVersion.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ MACRO(CREATE_QGSVERSION)
2626
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
2727
)
2828
ELSE(WIN32 AND NOT CMAKE_CROSS_COMPILING)
29+
STRING(REPLACE "'" "%x27" _rn ${RELEASE_NAME})
2930
ADD_CUSTOM_COMMAND(
3031
OUTPUT ${CMAKE_BINARY_DIR}/qgsversion.h ${CMAKE_BINARY_DIR}/qgsversion.inc
3132
COMMAND ${GITCOMMAND} log -n1 --pretty=\#define\\ QGSVERSION\\ \\"%h\\" >${CMAKE_BINARY_DIR}/qgsversion.h.temp
32-
COMMAND ${GITCOMMAND} log -n1 --pretty='PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} \(%h\)\"' >${CMAKE_BINARY_DIR}/qgsversion.inc
33+
COMMAND ${GITCOMMAND} log -n1 --pretty='PROJECT_NUMBER = \"${COMPLETE_VERSION}-${_rn} \(%h\)\"' >${CMAKE_BINARY_DIR}/qgsversion.inc
3334
COMMAND ${GITCOMMAND} config remote.$$\(${GITCOMMAND} config branch.$$\(${GITCOMMAND} name-rev --name-only HEAD\).remote\).url | sed -e 's/^/\#define QGS_GIT_REMOTE_URL \"/' -e 's/$$/\"/' >>${CMAKE_BINARY_DIR}/qgsversion.h.temp
3435
COMMAND ${CMAKE_COMMAND} -DSRC=${CMAKE_BINARY_DIR}/qgsversion.h.temp -DDST=${CMAKE_BINARY_DIR}/qgsversion.h -P ${CMAKE_SOURCE_DIR}/cmake/CopyIfChanged.cmake
3536
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/.git/index

‎scripts/release.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ ($$)
162162
run( "perl -i -pe 's#<releases>#<releases>\n <release version=\"$newmajor.$newminor.$newpatch\" date=\"" . strftime("%Y-%m-%d", localtime) . "\" />#' linux/org.qgis.qgis.appdata.xml.in", "appdata update failed" );
163163

164164
unless( defined $dopoint ) {
165-
run( "scripts/update_news.pl $newmajor.$newminor '$newreleasename'", "could not update news" ) if $major>2 || ($major==2 && $minor>14);
165+
run( "scripts/update_news.pl $newmajor.$newminor \"$newreleasename\"", "could not update news" ) if $major>2 || ($major==2 && $minor>14);
166166

167167
run( "git commit -n -a -m \"changelog and news update for $release\"", "could not commit changelog and news update" );
168168

@@ -181,7 +181,7 @@ ($$)
181181
run( "perl -i -pe 's/qgis-dev-deps/qgis-ltr-deps/;' INSTALL.md", "could not update osgeo4w deps package" ) if $doltr;
182182
run( "perl -i -pe 's/qgis-dev-deps/qgis-rel-deps/;' INSTALL.md", "could not update osgeo4w deps package" ) unless $doltr;
183183
run( "cp -v images/splash/splash-$newmajor.$newminor.png images/splash/splash.png", "splash png switch failed" );
184-
run( "git commit -n -a -m 'Release of $release ($newreleasename)'", "release commit failed" );
184+
run( "git commit -n -a -m \"Release of $release ($newreleasename)\"", "release commit failed" );
185185
run( "git tag $reltag -m 'Version $release'", "release tag failed" );
186186
run( "for i in \$(seq 20); do tx push -s --branch $relbranch && exit 0; echo \"Retry \$i/20...\"; done; exit 1", "push translation for $relbranch branch" );
187187
} else {

‎scripts/update_ts.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ if [ $action = push ]; then
135135
cp i18n/qgis_en.ts /tmp/qgis_en.ts-downloaded
136136
perl scripts/ts_clear.pl # reset English translations
137137
elif [ $action = pull ]; then
138+
mv i18n/qgis_en.ts i18n/qgis_en.ts.source
138139
rm -f i18n/qgis_*.ts
140+
mv i18n/qgis_en.ts.source i18n/qgis_en.ts
139141

140142
echo Pulling new translations...
141143
if [ "$#" -gt 0 ]; then

0 commit comments

Comments
 (0)
Please sign in to comment.