Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gnome-bluetooth
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
gnome-bluetooth
Commits
f8706c33
Commit
f8706c33
authored
Sep 23, 2020
by
Bastien Nocera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: Add check-news.sh helper
parent
08defddc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
0 deletions
+88
-0
check-news.sh
check-news.sh
+82
-0
meson.build
meson.build
+6
-0
No files found.
check-news.sh
0 → 100755
View file @
f8706c33
#!/bin/sh
# Copyright (C) 2019 Red Hat, Inc.
# Author: Bastien Nocera <hadess@hadess.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Add to your top-level meson.build to check for an updated NEWS file
# when doing a "dist" release, similarly to automake's check-news:
# https://www.gnu.org/software/automake/manual/html_node/List-of-Automake-options.html
#
# Checks NEWS for the version number:
# meson.add_dist_script(
# find_program('check-news.sh').path(),
# '@0@'.format(meson.project_version())
# )
#
# Checks NEWS and data/foo.appdata.xml for the version number:
# meson.add_dist_script(
# find_program('check-news.sh').path(),
# '@0@'.format(meson.project_version()),
# 'NEWS',
# 'data/foo.appdata.xml'
# )
usage
()
{
echo
"
$0
VERSION [FILES...]"
exit
1
}
check_version
()
{
VERSION
=
$1
# Look in the first 15 lines for NEWS files, but look
# everywhere for other types of files
if
[
"
$2
"
=
"NEWS"
]
;
then
DATA
=
`
sed
15q
$SRC_ROOT
/
"
$2
"
`
else
DATA
=
`
cat
$SRC_ROOT
/
"
$2
"
`
fi
case
"
$DATA
"
in
*
"
$VERSION
"
*
)
:
;;
*
)
echo
"
$2
not updated; not releasing"
1>&2
;
exit
1
;;
esac
}
SRC_ROOT
=
${
MESON_DIST_ROOT
:-
"./"
}
if
[
$#
-lt
1
]
;
then
usage
;
fi
VERSION
=
$1
shift
if
[
$#
-eq
0
]
;
then
check_version
$VERSION
'NEWS'
exit
0
fi
for
i
in
$@
;
do
check_version
$VERSION
"
$i
"
done
exit
0
meson.build
View file @
f8706c33
...
...
@@ -133,3 +133,9 @@ output += ' Prefix......................: ' + gnomebt_prefix + '\n'
output += ' Documentation...............: ' + enable_gtk_doc.to_string() + '\n'
output += ' GObject-Introspection.......: ' + enable_gir.to_string()
message(output)
meson.add_dist_script(
find_program('check-news.sh').path(),
'@0@'.format(meson.project_version()),
'NEWS',
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment