Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
justinfreeman (Agileware)
Core
Commits
44fa8c11
Commit
44fa8c11
authored
11 years ago
by
colemanw
Browse files
Options
Downloads
Patches
Plain Diff
Improve "update" mode in releaser to escape regex and show diff
parent
452c9185
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/scripts/releaser/releaser
+21
-7
21 additions, 7 deletions
tools/scripts/releaser/releaser
with
21 additions
and
7 deletions
tools/scripts/releaser/releaser
+
21
−
7
View file @
44fa8c11
...
...
@@ -167,17 +167,32 @@ function do_publish() {
#################################################
## Update Version Info
function
do_update
()
{
echo
"VERSION UPDATE:
Please e
nter the version that comes after
$version
"
echo
"VERSION UPDATE:
E
nter the version that comes after
$version
(or enter nothing to abort)
"
read
new_ver
if
[
-n
"
$new_ver
"
]
;
then
cd
$workdir
/
$version
/export
# escape regex special chars
arg
=
`
echo
"
$version
"
|
sed
's:[]\[\^\$\.\*\/]:\\\\&:g'
`
for
file
in
xml/version.xml sql/civicrm_generated.mysql
;
do
sed
"s/
$version
/
$new_ver
/g"
<
$file
>
$file
.tmp
set
-ex
git checkout
$file
sed
"s/
$arg
/
$new_ver
/"
<
$file
>
$file
.tmp
mv
$file
.tmp
$file
git add
$file
set
+x
done
git commit
-m
"Update version to
$new_ver
"
git push origin
"
$start_point
"
# print the diff directly to the screen
git diff |
cat
echo
"Push these changes? y/n"
read
input
if
[
"
$input
"
=
"y"
]
;
then
set
-ex
git add xml/version.xml sql/civicrm_generated.mysql
git commit
-m
"Update version to
$new_ver
"
git push origin
"
$start_point
"
set
+x
else
do_update
fi
else
echo
"No version entered. Aborting version update."
fi
...
...
@@ -214,9 +229,8 @@ for ACT in "$@" ; do
set
+x
;;
--update
)
set
-ex
do_update
set
+x
do_update
;;
--clean
)
set
-ex
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment