[packages/rpm-build-tools] handle jenkins urls

glen glen at pld-linux.org
Tue Aug 20 20:46:56 CEST 2013


commit 89734d5c1b3d85298e94a89940210bbab74df956
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Aug 20 21:46:29 2013 +0300

    handle jenkins urls

 pldnotify.awk | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/pldnotify.awk b/pldnotify.awk
index dc33cb1..9c0ca74 100755
--- a/pldnotify.awk
+++ b/pldnotify.awk
@@ -689,7 +689,20 @@ function chrome_upgrade(name, ver,   cmd, sourceurl) {
 	return ver
 }
 
-function process_data(name, ver, rel, src,   nver) {
+function jenkins_upgrade(name, ver, urls,  url, i, c, chunks, nver) {
+	for (i in urls) {
+		url = urls[i]
+		# http://mirrors.jenkins-ci.org/war-stable/1.509.1/jenkins.war?/jenkins-1.509.1.war
+		gsub("/" ver "/jenkins.war\?/jenkins-" ver ".war", "/", url);
+		c = split(get_links(url), chunks, "/")
+		# new version is second one from the bottom
+		nver = chunks[c - 2]
+		gsub(/ /, "", nver)
+		return nver;
+	}
+}
+
+function process_data(name, ver, rel,     src, nver, i) {
 	if (name ~ /^php-pear-/) {
 		nver = pear_upgrade(name, ver);
 	} else if (name == "ZendFramework") {
@@ -704,6 +717,8 @@ function process_data(name, ver, rel, src,   nver) {
 		nver = nodejs_upgrade(name, ver);
 	} else if (name ~ "^ruby-") {
 		nver = rubygem_upgrade(name, ver);
+	} else if (name ~ "jenkins") {
+		nver = jenkins_upgrade(name, ver, src);
 	}
 
 	if (nver) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/89734d5c1b3d85298e94a89940210bbab74df956



More information about the pld-cvs-commit mailing list