Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
devops
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
osm
devops
Commits
a3f638ca
Commit
a3f638ca
authored
7 years ago
by
Michael Marchetti
Browse files
Options
Downloads
Patches
Plain Diff
Update changelog generation for release tag
Signed-off-by:
Michael Marchetti
<
mmarchetti@sandvine.com
>
parent
1dd7bdd8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/generatechangelog-pipeline.sh
+10
-1
10 additions, 1 deletion
tools/generatechangelog-pipeline.sh
with
10 additions
and
1 deletion
tools/generatechangelog-pipeline.sh
+
10
−
1
View file @
a3f638ca
...
...
@@ -2,8 +2,17 @@
REPO_NAME
=
$(
basename
$(
git config
--get
remote.origin.url
)
|
cut
-d
'.'
-f1
)
# get the latest tag
TAG_END
=
"HEAD"
TAG_START
=
$(
git tag |
sort
-Vr
|
head
-1
)
head_tag_diff
=
$(
git rev-list
$TAG_START
^HEAD |wc
-l
)
if
[
$head_tag_diff
-eq
0
]
;
then
# HEAD and latest tag intersect. Instead try and find a previous tag and use that as the start diff
TAG_END
=
$TAG_START
TAG_START
=
$(
git tag |
sort
-Vr
|
head
-2
|
sort
-V
|
head
-1
)
else
TAG_END
=
"HEAD"
fi
git pull
--tags
origin master &> /dev/null
echo
"<h1>
$REPO_NAME
Changelog</h1>"
echo
"<h2>tag:
${
TAG_START
}
->
${
TAG_END
}
</h2>"
...
...
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