misc/pre-commit \
misc/pyflakes.py
-prepare-release-tag: Makefile
- @TAG=`echo $(VERSION)|sed s/\\\./_/g`;\
- echo "git tag GOBJECT_INTROSPECTION_$$TAG"; \
- git tag -m "Tag $$VERSION" -a \
- GOBJECT_INTROSPECTION_$$TAG
-
-prepare-minor-release: Makefile $(distdir).tar.bz2 prepare-release-tag
- python $(top_srcdir)/tools/verbump.py
-
-upload-release: $(distdir).tar.bz2
- git log origin/master..master
- @echo -n "Ok to push? [y/N] "; read ans; test x$$ans == xy || exit 1
- git push --tags origin master:master
- scp $(distdir).tar.bz2 master.gnome.org:
- ssh master.gnome.org install-module $(distdir).tar.bz2
-
check-local:
gtester --verbose $(GTESTER_PROGS)
@test ! -d $(top_srcdir)/.git || (test -f .git/hooks/pre-commit || (echo -e "ERROR: missing \
check-pyflakes:
@echo " CHECK Pyflakes"
@find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pyflakes.py
+
+
+# Colin's handy Makefile bits for:
+# 1) stuffing tarballs with pre-generated scripts from your workstation
+# 2) bumping configure.ac version post-release
+# 3) tagging correctly in git
+# 4) uploading to gnome.org
+# To use:
+# $ make check
+# $ make dist
+# $ make prepare-minor-release
+
+# Customize to taste
+TAG_PREFIX=GOBJECT_INTROSPECTION_
+COMPRESSION=.bz2
+
+
+PACKAGE=@PACKAGE@
+VERSION=@VERSION@
+DISTNAME=$(PACKAGE)-$(VERSION).tar$(COMPRESSION)
+TAG_VERSION=$(shell echo $(VERSION) |sed s/\\\./_/g)
+
+prepare-release-tag: Makefile.release
+ git tag -m "Tag $(TAG_VERSION)" -a $(TAG_PREFIX)$(TAG_VERSION)
+
+prepare-minor-release: $(DISTNAME) prepare-release-tag
+ env top_srcdir=$(top_srcdir) python $(top_srcdir)/tools/verbump.py
+
+upload-release: $(DISTNAME)
+ git log origin/master..master
+ @echo -n "Ok to push? [y/N] "; read ans; test x$$ans == xy || exit 1
+ git push --tags origin master:master
+ scp $(DISTNAME) master.gnome.org:
+ ssh master.gnome.org install-module $(DISTNAME)
+
package = _extract_config_log_variable('PACKAGE_TARNAME')
version = _extract_config_log_variable('VERSION')
-f = open('configure.ac');
-newf = open('configure.ac.new', 'w')
+configure_path=os.path.join(os.environ['top_srcdir'], 'configure.ac')
+f = open(configure_path)
+newf = open(configure_path + '.tmp', 'w')
for line in f:
m = micro_version_re.match(line)
if not m:
newf.write(micro_version_replace % (newv, ))
newf.close()
-os.rename('configure.ac.new', 'configure.ac')
+os.rename(configure_path + '.tmp', configure_path)
print "Successfully wrote new 'configure.ac' with post-release version bump"
-args=['git', 'commit', '-m', "configure: Post-release version bump", 'configure.ac']
+args=['git', 'commit', '-m', "configure: Post-release version bump", configure_path]
print "Running: %r" % (args, )
subprocess.check_call(args)