Re: [Deskbar] 2.14 backports



On Sun, 2006-04-09 at 23:03 +1000, Nigel Tao wrote:
> OK, I'll try not to suck 100% at this.
> 
:D 
No worries i just applied all patches to 2.14 branch in one big chunk,
so it could get minimal testing, i think it's now ready for release..

> What has been your procedure for rolling a tarball?  Is it just "make
> clean" and then "tar cvzf ..." or is there something else I ought to
> do?

The procedure is:
cvs up -dP

vim configure.ac (check version number)
vim ChangeLog (check that there is a line with ==='s indicating version
change, look below in the file for examples)

make
make install (and test briefly)
gen-news > NEWS.1
gen-news-po > NEWS.2

cat NEWS.1 NEWS.2 NEWS > NEWS.3
mv NEWS.3 NEWS
rm NEWS.*

vim NEWS (tidy the format and stuff)

Now, it should be ready, with an updated NEWS, Changelog, and
configure.ac

make distcheck (wait it tells you success, if not, fix the problem
(related to autotools) and repeat)

Now you have a tarball..
scp tarball.tar.gz ntao master gnome org:
ssh ntao master gnome org
> install-module tarball.tar.gz
> Answer questions, (i think once or twice yes)
it generates bz2, signals ftp mirrors to sync and install module in
correct location

Prepare an announce email to deskbar list, a little text header, then
paste the relevant NEWS snippet in the mail, and send

I think that's all :)
Good luck !

> And do you have a script for generating the NEWS file, or do you just
> manually inspect the ChangeLog?

I attach you my script to generate it, and also to extrace changes from
po files. The output is raw and must be processed by hand to remove old
stuff and tidy up the format..

Run the script while in the deskbar root directory..

The tarball must be published before tomorrow at 00h or somthing
Thanks for the help, i'll do the same for 2.15 when times come !
Raf
PS. CC-ing the list for future releases if someone needs to do it
#!/usr/bin/env python
import sys, re, os

#----------------------------------------------------------------------------
CONFIG_MATCH = re.compile(r"AC_INIT\s*\(\s*(.*)\s*,\s*(.*)\s*,.*") #\s*,\s*(.*)\s*[,\)].*
config = file("configure.ac").read()
match = CONFIG_MATCH.match(config)
if match != None:
	PROGRAM = match.group(1)
	VERSION = match.group(2)
else:
	PROGRAM = "Deskbar Applet"
	VERSION = "0.7.0"

TITLE = "%s %s" % (PROGRAM, VERSION)
UNDERLINE = len(TITLE) * "="

TEMPLATE = """
%s
%s
%s

Changes:
%s
"""[1:] % (UNDERLINE, TITLE, UNDERLINE, "%s")

# if CONTRIB_TEMPLATE is None print each changelog entry along with it's author
#else collect all contributors in the last line. as defined by the template
#CONTRIB_TEMPLATE = None
CONTRIB_TEMPLATE = "Contributors to this release: %s"

# Wether to stop when a line like ========= Version ======== is found
BREAK_AT_VERSION_CHANGE = True
if "-a" in sys.argv:
	BREAK_AT_VERSION_CHANGE = False

#------------------------------------------------------------------------

STATE_HEADER           = 1
STATE_HEADER_NAME_END  = 2
STATE_HEADER_VERSION   = 3
STATE_HEADER_VERSION_IN= 4
STATE_FILES_OR_COMMENT = 5
STATE_FILES            = 6
STATE_COMMENT          = 7

content = file("ChangeLog").read()
state = STATE_HEADER
NEWLINE_FLAG = False
comments = []

comment = ""
name = ""
for char in content:
	if char in (" ", "\n", "\t"):
		if state == STATE_COMMENT and not comment.endswith(' '):
			comment = comment + ' '
		elif state == STATE_HEADER and not name.endswith(' '):
			name = name + ' '
		if char == "\n":
			NEWLINE_FLAG = True
		continue	

	if state == STATE_HEADER or state == STATE_HEADER_NAME_END:
		if char == ">":
			state = STATE_FILES_OR_COMMENT
		elif char in "0123456789-":
			pass
		elif char == "<":
			state = STATE_HEADER_NAME_END
		elif state == STATE_HEADER:
			name = name + char
		
	elif state == STATE_FILES:
		if char == ":":
			state = STATE_FILES_OR_COMMENT
		
	elif state == STATE_FILES_OR_COMMENT:
		if char == "*" or char == "(":
			state = STATE_FILES
		else:
			state = STATE_COMMENT
			comment = comment + char
	
	elif state == STATE_COMMENT:
		if (char in "0123456789" or char == "*" or char == "=") and NEWLINE_FLAG:
			if char in "0123456789":
				state = STATE_HEADER
			elif char == "*":
				state = STATE_FILES
			elif BREAK_AT_VERSION_CHANGE: # and char == "="
				# We have a version change, we can stop or continue
				break
			
			if re.match(r"(A|R) [a-zA-Z0-9-/_\. ]+:", comment.strip()) == None:
				#Remember the comment
				name = name.strip()
				if name == "":
					name = comments[-1][0]
				comments.append((name.strip(), comment.strip()))
			
			# Clear the current comment
			comment = ""
			name = ""
		else:
			# Appending letters
			comment = comment + char

	NEWLINE_FLAG = False

if comment != "":
	name = name.strip()
	if name == "":
		name = comments[-1][0]
	comments.append((name.strip(), comment.strip()))

if CONTRIB_TEMPLATE != None:
	print TEMPLATE % ('\n'.join(["\t* %s" % comment[1] for comment in comments]))
	
	contributors = set()
	for name, comment in comments:
		contributors.add(name)
	
	contrib_string = "" 
	for name in contributors:
		if contrib_string == "":
			contrib_string = name
		elif name != "":
			contrib_string = "%s, %s" % (contrib_string, name)
	
	print CONTRIB_TEMPLATE % contrib_string
else:
	print TEMPLATE % ('\n'.join(["\t* %s (%s)" % (comment[1], comment[0]) for comment in comments]))
print
#!/usr/bin/env python
import sys, re

#----------------------------------------------------------------------------
TEMPLATE = """
Translations:
%s
"""[1:]

# if CONTRIB_TEMPLATE is None print each changelog entry along with it's author
#else collect all contributors in the last line. as defined by the template
#CONTRIB_TEMPLATE = None
CONTRIB_TEMPLATE = "Contributors to the translations: %s"

# Wether to stop when a line like ========= Version ======== is found
BREAK_AT_VERSION_CHANGE = True
if "-a" in sys.argv:
	BREAK_AT_VERSION_CHANGE = False

#------------------------------------------------------------------------

STATE_HEADER           = 1
STATE_HEADER_NAME_END  = 2
STATE_HEADER_VERSION   = 3
STATE_HEADER_VERSION_IN= 4
STATE_FILES_OR_COMMENT = 5
STATE_FILES            = 6
STATE_COMMENT          = 7

content = file("po/ChangeLog").read()
state = STATE_HEADER
NEWLINE_FLAG = False
comments = []

comment = ""
name = ""
for char in content:
	if char in (" ", "\n", "\t"):
		if state == STATE_COMMENT and not comment.endswith(' '):
			comment = comment + ' '
		elif state == STATE_HEADER and not name.endswith(' '):
			name = name + ' '
		if char == "\n":
			NEWLINE_FLAG = True
		continue	

	if state == STATE_HEADER or state == STATE_HEADER_NAME_END:
		if char == ">":
			state = STATE_FILES_OR_COMMENT
		elif char in "0123456789-":
			pass
		elif char == "<":
			state = STATE_HEADER_NAME_END
		elif state == STATE_HEADER:
			name = name + char
		
	elif state == STATE_FILES:
		if char == ":":
			state = STATE_FILES_OR_COMMENT
		
	elif state == STATE_FILES_OR_COMMENT:
		if char == "*" or char == "(":
			state = STATE_FILES
		else:
			state = STATE_COMMENT
			comment = comment + char
	
	elif state == STATE_COMMENT:
		if (char in "0123456789" or char == "*" or char == "=") and NEWLINE_FLAG:
			if char in "0123456789":
				state = STATE_HEADER
			elif char == "*":
				state = STATE_FILES
			elif BREAK_AT_VERSION_CHANGE: # and char == "="
				# We have a version change, we can stop or continue
				break
			
			if re.match(r"(A|R) [a-zA-Z0-9-/_\. ]+:", comment.strip()) == None:
				#Remember the comment
				name = name.strip()
				if name == "":
					name = comments[-1][0]
				comments.append((name.strip(), comment.strip()))
			
			# Clear the current comment
			comment = ""
			name = ""
		else:
			# Appending letters
			comment = comment + char

	NEWLINE_FLAG = False

if comment != "":
	name = name.strip()
	if name == "":
		name = comments[-1][0]
	comments.append((name.strip(), comment.strip()))

if CONTRIB_TEMPLATE != None:
	print TEMPLATE % ('\n'.join(["\t* %s" % comment[1] for comment in comments]))
	
	contributors = set()
	for name, comment in comments:
		contributors.add(name)
	
	contrib_string = "" 
	for name in contributors:
		if contrib_string == "":
			contrib_string = name
		elif name != "":
			contrib_string = "%s, %s" % (contrib_string, name)
	
	print CONTRIB_TEMPLATE % contrib_string
else:
	print TEMPLATE % (PROGRAM, VERSION, '\n'.join(["\t* %s (%s)" % (comment[1], comment[0]) for comment in comments]))
print

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]