[cosmo-dev] Re: [commits-cosmo] (travis) [6412] Pom version script
Travis Vachon
travis at osafoundation.org
Mon Dec 17 13:38:51 PST 2007
Actually didn't mean to check this in yet, but there's not real reason
not to:
This is the beginnings of a script to change the pom version numbers
automatically. Still needed is the logic to actually do the file
string replacement.
-Travis
On Dec 17, 2007, at 1:33 PM, svncheckin at osafoundation.org wrote:
> Revision
> 6412
> Author
> travis
> Date
> 2007-12-17 13:33:16 -0800 (Mon, 17 Dec 2007)
> Log Message
>
> Pom version script
> Added Paths
>
> cosmo/trunk/tools/set_pom_version.py
> Diff
>
> Added: cosmo/trunk/tools/set_pom_version.py (6411 => 6412)
>
> --- cosmo/trunk/tools/set_pom_version.py 2007-12-17 21:23:06 UTC
> (rev 6411)
> +++ cosmo/trunk/tools/set_pom_version.py 2007-12-17 21:33:16 UTC
> (rev 6412)
> @@ -0,0 +1,55 @@
> +#!/usr/bin/env python
> +import os
> +import sys
> +import shutil
> +import getopt
> +
> +parent_pom = ["./pom.xml"]
> +cosmo_pom = ["./cosmo/pom.xml"]
> +set_parent_poms = ["./jsonrpc-java-js/pom.xml",
> + "./olson/pom.xml",
> + "./migration/pom.xml",
> + "./snarf/pom.xml"]
> +dojo_poms = ["./dojo/pom.xml"]
> +
> +def usage():
> + print "Usage"
> +
> +def get_new_versions():
> + version = None
> + dojo_version = None
> + try:
> + opts, args = getopt.getopt(sys.argv[1:], "v:d:")
> + except getopt.GetoptError:
> + # print help information and exit:
> + usage()
> + sys.exit(2)
> +
> + for o,a in opts:
> + if o == "-v":
> + version = a
> + if o == "-d":
> + dojo_version = a
> + return version, dojo_version
> +
> +def get_old_versions():
> +
> +
> +if __name__ == "__main__":
> +
> + required_files = parent_pom + cosmo_pom + set_parent_poms +
> dojo_poms
> +
> + for file_path in required_files:
> + if not os.path.exists(file_path):
> + print file_path + " does not exist."
> + sys.exit(1)
> +
> + version, dojo_version = get_versions()
> +
> + if version == None or dojo_version == None:
> + usage()
> + sys.exit(1)
> +
> +
> +
> +
> Property changes on: cosmo/trunk/tools/set_pom_version.py
> ___________________________________________________________________
> Name: svn:executable
> + *
>
> _______________________________________________
> Commits-Cosmo mailing list
> Commits-Cosmo at osafoundation.org
> http://lists.osafoundation.org/cgi-bin/mailman/listinfo/commits-cosmo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osafoundation.org/pipermail/cosmo-dev/attachments/20071217/677d2cf4/attachment.html
More information about the cosmo-dev
mailing list