Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
cm-projects
RIOT
Commits
819987c5
Commit
819987c5
authored
8 years ago
by
Martine Lenders
Browse files
Options
Downloads
Patches
Plain Diff
dist/tools: add release stats script
parent
15d99f0c
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
dist/tools/release-stats/release-stats.sh
+39
-0
39 additions, 0 deletions
dist/tools/release-stats/release-stats.sh
with
39 additions
and
0 deletions
dist/tools/release-stats/release-stats.sh
0 → 100755
+
39
−
0
View file @
819987c5
#! /bin/sh
#
# release-stats.sh
# Copyright (C) 2017 Martine Lenders <mail@martine-lenders.eu>
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
# This script is intended to help release managers to collect statistics about
# a release for https://github.com/RIOT-OS/RIOT/wiki/release-statistics
RIOTBASE
=
"
$(
realpath
"
$(
cd
"
$(
dirname
"
${
0
}
"
)
"
&&
pwd
)
/../../.."
)
"
OLD
=
"
${
1
}
"
NEW
=
"
${
2
}
"
if
[
$#
-lt
2
]
;
then
echo
"usage:
${
0
}
<old> <new> [<riotbase>]"
>
&2
exit
1
fi
if
[
$#
-gt
2
]
;
then
RIOTBASE
=
"
$(
realpath
"
${
3
}
"
)
"
fi
FILES
=
$(
git ls-tree
--full-tree
-r
"
${
NEW
}
"
)
START
=
$(
git
-C
"
${
RIOTBASE
}
"
log
-n
1
--pretty
=
"format:%at"
"
${
OLD
}
"
)
END
=
$(
git
-C
"
${
RIOTBASE
}
"
log
-n
1
--pretty
=
"format:%at"
"
${
NEW
}
"
)
echo
" <tr>"
echo
" <td>
${
NEW
}
</td>"
echo
" <td>
$(
echo
"
${
FILES
}
"
|
wc
-l
)
</td>"
echo
-n
" <td>
$(
echo
"
${
FILES
}
"
|
awk
'{ print $3 }'
| xargs
-I
'{}'
git cat-file blob
'{}'
|
wc
-l
)
"
echo
"(
$(
echo
"
$FILES
"
|
grep
-i
"[chs]$"
|
awk
'{ print $3 }'
| xargs
-I
'{}'
git cat-file blob
'{}'
|
wc
-l
)
)</td>"
echo
" <td>
$((
(
END
-
START
)
/
(
60
*
60
*
24
)
))
days</td>"
echo
" <td>
$(
git log
--no-merges
--pretty
=
oneline
"
${
OLD
}
"
..
"
${
NEW
}
"
|
wc
-l
)
</td>"
echo
" <td>
$(
git diff
--shortstat
--no-renames
"
${
OLD
}
"
..
"
${
NEW
}
"
|
sed
's#^\s\+##'
)
</td>"
echo
" <td>
$(
git shortlog
--no-merges
-n
-s
"
${
OLD
}
"
..
"
${
NEW
}
"
|
head
-n
5 |
sed
's#\s\+# #g;s#^ ##;s#$#<br />#;2,$s#^# #'
)
</td>"
echo
" </tr>"
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