Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
provision
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
provision
Commits
c0be6711
Commit
c0be6711
authored
Sep 19, 2014
by
Herman van Rink
Browse files
Options
Downloads
Patches
Plain Diff
Add a release step to set tags in the other project repos
parent
ab07d746
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
release.sh
+35
-2
35 additions, 2 deletions
release.sh
with
35 additions
and
2 deletions
release.sh
+
35
−
2
View file @
c0be6711
...
@@ -56,9 +56,10 @@ The following operations will be done:
...
@@ -56,9 +56,10 @@ The following operations will be done:
4. commit those changes to git
4. commit those changes to git
5. lay down the tag
5. lay down the tag
6. revert the commit
6. revert the commit
7. (optionally) push those changes
7. clone fresh copies of hosting/hostmaster and eldir to lay down the tag
8. (optionally) push those changes
The operation can be aborted before step
7
. Don't forget that as
The operation can be aborted before step
8
. Don't forget that as
long as changes are not pushed upstream, this can all be reverted (see
long as changes are not pushed upstream, this can all be reverted (see
git-reset(1) and git-revert(1) ).
git-reset(1) and git-revert(1) ).
...
@@ -98,6 +99,8 @@ else
...
@@ -98,6 +99,8 @@ else
exit
1
exit
1
fi
fi
CURRENT_BRANCH
=
$(
git rev-parse
--abbrev-ref
HEAD
)
NEW_TAG
=
"
$major
-
$version
"
commitmsg
=
`
git commit
-m
"change version information for release
$version
"
`
commitmsg
=
`
git commit
-m
"change version information for release
$version
"
`
echo
$commitmsg
echo
$commitmsg
commitid
=
`
echo
$commitmsg
|
sed
's/^\[[^ ]* \([a-z0-9]*\)\].*$/\1/'
`
commitid
=
`
echo
$commitmsg
|
sed
's/^\[[^ ]* \([a-z0-9]*\)\].*$/\1/'
`
...
@@ -110,7 +113,37 @@ git reset --quiet HEAD 'debian/changelog'
...
@@ -110,7 +113,37 @@ git reset --quiet HEAD 'debian/changelog'
git checkout
--
'debian/changelog'
git checkout
--
'debian/changelog'
git commit
git commit
echo
"Work on the other project repositories."
mkdir
-p
build-area
;
# Hostmaster
rm
-rf
build-area/hostmaster
git clone
--branch
$CURRENT_BRANCH
`
git config remote.origin.url |
sed
's/provision/hostmaster/'
`
build-area/hostmaster
echo
"Setting the tag
$NEW_TAG
in a clean hostmaster clone."
git
--work-tree
=
build-area/hostmaster
--git-dir
=
build-area/hostmaster/.git tag
-a
$NEW_TAG
-m
'Add a new release tag.'
# Hosting
rm
-rf
build-area/hosting
git clone
--branch
$CURRENT_BRANCH
`
git config remote.origin.url |
sed
's/provision/hosting/'
`
build-area/hosting
echo
"Setting the tag
$NEW_TAG
in a clean hosting clone."
git
--work-tree
=
build-area/hosting
--git-dir
=
build-area/hosting/.git tag
-a
$NEW_TAG
-m
'Add a new release tag.'
# Eldir
rm
-rf
build-area/eldir
git clone
--branch
$CURRENT_BRANCH
`
git config remote.origin.url |
sed
's/provision/eldir/'
`
build-area/eldir
echo
"Setting the tag
$NEW_TAG
in a clean eldir clone."
git
--work-tree
=
build-area/eldir
--git-dir
=
build-area/eldir/.git tag
-a
$NEW_TAG
-m
'Add a new release tag.'
# Can we push?
if
prompt_yes_no
"push tags and commits upstream? "
;
then
if
prompt_yes_no
"push tags and commits upstream? "
;
then
# this makes sure we push the commit *and* the tag
# this makes sure we push the commit *and* the tag
git push
--tags
origin HEAD
git push
--tags
origin HEAD
git
--work-tree
=
build-area/hostmaster
--git-dir
=
build-area/hostmaster/.git push
--tags
origin HEAD
git
--work-tree
=
build-area/hosting
--git-dir
=
build-area/hosting/.git push
--tags
origin HEAD
git
--work-tree
=
build-area/eldir
--git-dir
=
build-area/eldir/.git push
--tags
origin HEAD
fi
fi
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