You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by da...@apache.org on 2016/07/17 08:53:42 UTC
[1/2] wicket git commit: Use master’s version of build-versions.py
Repository: wicket
Updated Branches:
refs/heads/wicket-6.x 0fcdbf4f8 -> 573e278f1
Use master\u2019s version of build-versions.py
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/573e278f
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/573e278f
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/573e278f
Branch: refs/heads/wicket-6.x
Commit: 573e278f19c6c8dd80b8de97d238e742c323141e
Parents: 2785609
Author: Martijn Dashorst <da...@apache.org>
Authored: Sun Jul 17 10:53:22 2016 +0200
Committer: Martijn Dashorst <da...@apache.org>
Committed: Sun Jul 17 10:53:33 2016 +0200
----------------------------------------------------------------------
build-versions.py | 105 ++++++++++---------------------------------------
1 file changed, 20 insertions(+), 85 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/573e278f/build-versions.py
----------------------------------------------------------------------
diff --git a/build-versions.py b/build-versions.py
index c67ef16..217e309 100755
--- a/build-versions.py
+++ b/build-versions.py
@@ -17,101 +17,36 @@
#
import sys
-import xml.etree.ElementTree as ET
-import re
+from xml.dom.minidom import parse
-relVersions = list()
-devVersions = list()
+groupId = "org.apache.wicket"
-NS = {"maven":"http://maven.apache.org/POM/4.0.0"}
+if len(sys.argv) != 3:
+ print "Usage: %s <release-version> <dev-version>" % sys.argv[0]
+ sys.exit(1)
-def get(pom, tag):
- return list(pom.iterfind('maven:' + tag, NS))[0].text
+relVersion = sys.argv[1]
+devVersion = sys.argv[2]
-def addVersions(groupId, artifactId, releaseVersion, developVersion):
- relVersions.append("project.rel." + groupId + "\\:" + artifactId + "=" + releaseVersion)
- devVersions.append("project.dev." + groupId + "\\:" + artifactId + "=" + developVersion)
+relVersions = []
+devVersions = []
-def determineNextWicketVersion():
- # Regular expression for matching a semver version identifier
- SV = re.compile(
- "^(?P<major>[0-9]+)\."
- "(?P<minor>[0-9]+)\."
- "(?P<patch>[0-9]+)"
- "(?:-(?P<prerel>[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?"
- "(?:\+(?P<build>[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$")
-
- pom = ET.parse("pom.xml")
-
- if get(pom, 'groupId') == 'org.apache.wicket' and get(pom, 'artifactId') == 'wicket-parent':
- projectVersion = list(pom.iterfind('maven:version', NS))[0].text
- versionInfo = SV.match(projectVersion).groupdict();
- releaseVersion = "" + versionInfo["major"] + "." + versionInfo["minor"] + "." + versionInfo["patch"]
- developVersion = "" + versionInfo["major"] + "." + str(int(versionInfo["minor"]) + 1) + "." + versionInfo["patch"] + "-SNAPSHOT"
-
- return releaseVersion, developVersion
- else:
- print >> sys.stderr, "This script can only be run in the folder of the wicket-parent pom"
- sys.exit(1)
-
-def determineNextExperimentalVersion(module):
- # Regular expression for matching experimental version identifier that don't
- # conform to the semver standard of x.y.z versioning.
- EV = re.compile(
- "^0\."
- "(?P<minor>[0-9]+)"
- "-SNAPSHOT$")
-
- pom = ET.parse("wicket-experimental/" + module + "/pom.xml")
-
- if get(pom, 'artifactId') == module:
- projectVersion = list(pom.iterfind('maven:version', NS))[0].text
- versionInfo = EV.match(projectVersion).groupdict();
- releaseVersion = "0." + versionInfo["minor"]
- developVersion = "0." + str(int(versionInfo["minor"]) + 1) + "-SNAPSHOT"
-
- return releaseVersion, developVersion
- else:
- print >> sys.stderr, "This function only works for experimental wicket 6 modules"
- sys.exit(1)
+def addVersions(groupId, module):
+ relVersions.append("project.rel." + groupId + "\\:" + module + "=" + relVersion)
+ devVersions.append("project.dev." + groupId + "\\:" + module + "=" + devVersion)
def getModulesFromParent(parentPomFile):
- pom = ET.parse(parentPomFile)
-
- res = list()
- modules = pom.findall('maven:modules/maven:module', NS)
- for module in modules :
- # rebuild the module name for quickstart and the testing/ projects
- # because in the generated properties file, they have the same groupId
- # as wicket-core and wicket-parent (are not under a sub-groupId)
- res.append(module.text.replace("testing/", "").replace("archetypes/quickstart", "wicket-archetype-quickstart"))
- return res
+ pom = parse(parentPomFile)
-#
-# All wicket core projects have the same groupId and version, and they are only
-# specified in the parent POM. Therefore we need to generate for each normal
-# module lines that upgrade their versions.
-#
-wicketReleaseVersion, wicketDevelopVersion = determineNextWicketVersion()
-
-print "# " + wicketReleaseVersion + "-SNAPSHOT -> " + wicketReleaseVersion + " -> " + wicketDevelopVersion
-
-modules = getModulesFromParent("pom.xml")
-modules.insert(0, 'wicket-parent')
+ for moduleTag in pom.getElementsByTagName('module'):
+ module = moduleTag.childNodes[0].nodeValue.replace("testing/", "").replace("archetypes/quickstart", "wicket-archetype-quickstart")
+ addVersions(groupId, module)
-for module in modules:
- addVersions('org.apache.wicket', module, wicketReleaseVersion, wicketDevelopVersion)
-
-#
-# Experimental modules are versioned independently, so we need to grab the
-# version from each POM and update that specifically. This will fail when we
-# get a multi-module experimental project, but until then, this suffices.
-#
+addVersions(groupId, "wicket-parent")
+addVersions("org.apache.wicket.experimental.wicket6", "wicket-experimental")
-modules = getModulesFromParent("wicket-experimental/pom.xml")
-for module in modules:
- releaseVersion, developVersion = determineNextExperimentalVersion(module)
- addVersions('org.apache.wicket.experimental.wicket6', module, releaseVersion, developVersion)
+getModulesFromParent("pom.xml")
+getModulesFromParent("wicket-native-websocket/pom.xml")
for version in relVersions:
print version
[2/2] wicket git commit: Don't sign and package the (examples) war in
release
Posted by da...@apache.org.
Don't sign and package the (examples) war in release
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2785609b
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2785609b
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2785609b
Branch: refs/heads/wicket-6.x
Commit: 2785609b6fd0a2094e63f596cb1c4243cefb519d
Parents: 0fcdbf4
Author: Martijn Dashorst <da...@apache.org>
Authored: Sun Jul 17 10:48:32 2016 +0200
Committer: Martijn Dashorst <da...@apache.org>
Committed: Sun Jul 17 10:53:33 2016 +0200
----------------------------------------------------------------------
release.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/2785609b/release.sh
----------------------------------------------------------------------
diff --git a/release.sh b/release.sh
index b4e96eb..687d7f6 100755
--- a/release.sh
+++ b/release.sh
@@ -406,7 +406,7 @@ echo "# Release configuration for Wicket-$version
scm.tag=${tag}
" > release.properties
-./build-versions.py >> release.properties
+./build-versions.py $version $next_version >> release.properties
echo "Contents of the release properties generated for Maven:
-------------------------------------------------------------------------------
@@ -518,8 +518,8 @@ gpg --print-md MD5 target/dist/apache-wicket-$version.zip > target/dist/apache-
echo "Create and sign the binaries"
mkdir target/apache-wicket-$version-bin
pushd target/apache-wicket-$version-bin
-find ../checkout ! \( -type d -name "WEB-INF" -prune \) -regex ".*wicket-[^/]*.[jw]ar" ! -name "*-sources*" ! -name "*-javadoc*" ! -name "*wicket-archetype-quickstart*" ! -name "wicket-common-tests*" -type f -exec cp {} . \;
-find ../checkout ! \( -type d -name "WEB-INF" -prune \) -regex ".*wicket-[^/]*.[jw]ar\.asc" ! -name "*-sources*" ! -name "*-javadoc*" ! -name "*wicket-archetype-quickstart*" ! -name "wicket-common-tests*" -type f -exec cp {} . \;
+find ../checkout ! \( -type d -name "WEB-INF" -prune \) -regex ".*wicket-[^/]*.[j]ar" ! -name "*-sources*" ! -name "*-javadoc*" ! -name "*wicket-archetype-quickstart*" ! -name "wicket-common-tests*" -type f -exec cp {} . \;
+find ../checkout ! \( -type d -name "WEB-INF" -prune \) -regex ".*wicket-[^/]*.[j]ar\.asc" ! -name "*-sources*" ! -name "*-javadoc*" ! -name "*wicket-archetype-quickstart*" ! -name "wicket-common-tests*" -type f -exec cp {} . \;
cp ../../LICENSE .
cp ../../README .
cp ../../NOTICE .