Add license (GPLv3+) and usage
[releases.git] / mkgitrel
1 #! /bin/bash
2
3 # Copyright 2021 Alexandre Oliva <lxoliva@fsfla.org>
4 #
5 # This program is part of GNU Linux-libre, a GNU project that
6 # publishes scripts to clean up Linux so as to make it suitable for
7 # use in the GNU Project and in Free System Distributions.
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
22 # USA
23
24
25 # usage: mkgitrel 5.5.5-gnu 5.4.3-gnu 5.0.111-gnu1 ...
26
27 # This is our release engineering script.  It's very tied to our
28 # internal cleaning-up repository structure, as well as to our public
29 # git and download repositories.
30
31 # It checks out upstream sources, finds and checks out cleaning-up
32 # scripts, cleans up the sources, commits the changes, creates signed
33 # tags for publishing, tarballs and patchfiles for publishing and for
34 # manual verification, checks that the tarballs look clean and waits
35 # for manual verification before preparing tags and tarballs for
36 # publishing.
37
38 success=:
39 for rel
40 do
41   case $rel in
42   v*)
43     echo $rel starts with v, that is unexpected >&2
44     success=false
45     ;;
46   *.*-gnu*)
47     ;;
48   *)
49     echo $rel does not end with -gnu, that is unexpected >&2
50     success=false
51     ;;
52   esac
53 done && $success &&
54
55 $0.cln "$@" &&
56
57 echo all revs cleaned up, awaiting manual check results... &&
58
59 $0.pub "$@" &&
60
61 echo all git tagging done, now compressing... &&
62
63 $0.rel "$@"
64
65 exit