Improve the release make targets
authorChristian Thaeter <ct@pipapo.org>
Mon, 31 May 2010 01:23:48 +0000 (03:23 +0200)
committerChristian Thaeter <ct@pipapo.org>
Mon, 31 May 2010 01:23:48 +0000 (03:23 +0200)
Makefile.am
admin/update_version.sh

index 6b37873..c122e0d 100644 (file)
@@ -98,13 +98,13 @@ README: nobug_manual.txt
        git add $(top_srcdir)/README
 
 ChangeLog.new:
-       cd $(top_srcdir);                                                                               \
+       @cd $(top_srcdir);                                                                              \
        git whatchanged --pretty=format:"%n%ai %h%n%aN <%aE>%n%n%s%n%n%b" latest-release..HEAD |        \
         sed -e 's/^:.*\.\.\.//' >ChangeLog.new;
 
 
 ChangeLog: ChangeLog.new
-       cd $(top_srcdir);                                       \
+       @cd $(top_srcdir);                                      \
        mv ChangeLog ChangeLog.bak;                             \
        echo >.newline;                                         \
        cat ChangeLog.new .newline ChangeLog.bak >ChangeLog;    \
@@ -122,7 +122,7 @@ NEWS.new:
        read;
 
 NEWS: NEWS.new
-       cd $(top_srcdir);                               \
+       @cd $(top_srcdir);                              \
        mv NEWS NEWS.old;                               \
        echo >.newline;                                 \
        cat NEWS.new .newline .newline NEWS.old > NEWS; \
@@ -131,23 +131,18 @@ NEWS: NEWS.new
 
 
 release-tag: NEWS ChangeLog README
-       cd $(top_srcdir);                                                                       \
+       @cd $(top_srcdir);                                                                      \
        git commit -m "This is release $$(admin/get_version.sh)";                               \
        git tag -f -s -m "This is release $$(admin/get_version.sh)" $$(admin/get_version.sh);   \
        git tag -f latest-release;
 
 
-release-2nd: dist release-tag
-       list='$(DIST_ARCHIVES)'; for i in $$list; do \
-               gpg -s $$i;\
-               rm $$i;\
+release:
+       git stash
+       @cd $(top_srcdir); admin/update_version.sh;
+       $(MAKE) release-tag
+       $(MAKE) dist
+       list='$(DIST_ARCHIVES)'; for i in $$list; do    \
+               gpg -s $$i;                             \
        done
-
-
-versionbump:
-       cd $(top_srcdir); \
-       admin/update_version.sh; \
-       git add configure.ac;
-
-release: versionbump
-       $(MAKE) release-2nd
+       git stash apply
index af18d3d..58fe6a5 100755 (executable)
@@ -15,7 +15,6 @@ fi
 current=$current_major.$current_minor
 
 echo $current >VERSION
-git add VERSION
 
 ed configure.ac <<EOF
 /AC_INIT/c
@@ -24,3 +23,6 @@ AC_INIT([nobug], [$current])
 w
 q
 EOF
+
+git add VERSION configure.ac
+