<pre style='margin:0'>
Rainer Müller (raimue) pushed a commit to branch master
in repository macports-contrib.
</pre>
<p><a href="https://github.com/macports/macports-contrib/commit/fab6636f6556beb082b9759ff034868d80f9052e">https://github.com/macports/macports-contrib/commit/fab6636f6556beb082b9759ff034868d80f9052e</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit fab6636f6556beb082b9759ff034868d80f9052e
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Tue Nov 8 17:17:58 2016 +0100
<span style='display:block; white-space:pre;color:#404040;'> portfile-gen: extract common "v" github tag prefix
</span>---
portfile-gen/portfile-gen | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/portfile-gen/portfile-gen b/portfile-gen/portfile-gen
</span><span style='display:block; white-space:pre;color:#808080;'>index 16cdcc1..065eedc 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/portfile-gen/portfile-gen
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/portfile-gen/portfile-gen
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -14,7 +14,7 @@ set supportedGroups [list perl5 php python ruby github]
</span>
proc printUsage {{channel stderr}} {
puts $channel "Usage: $::argv0 \[-h\] \[-g portgroup\] <portname> <portversion>"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- puts $channel " -g Specify a port group to use (perl5, python, etc)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts $channel " -g Specify a port group to use (perl5, python, github, etc)"
</span> puts $channel " -h This help"
puts $channel ""
puts $channel "portname name to use for the port; for group-based ports, don't"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -67,6 +67,10 @@ if {$groupCode eq "github"} {
</span> set verlist [split $portname /]
set github.user [lindex ${verlist} 0]
set portname [lindex ${verlist} 1]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[regexp {^v([0-9]+.[0-9.-]+)} $portversion -> version]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set portversion $version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set github.tag_prefix "v"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
puts "# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -101,9 +105,14 @@ switch ${groupCode} {
</span> puts "categories-append replaceme"
}
github {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- puts "PortGroup github 1.0"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- puts ""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- puts "github.setup ${github.user} ${portname} ${portversion}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts "PortGroup github 1.0"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists github.tag_prefix]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set tag_prefix " ${github.tag_prefix}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set tag_prefix ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts "github.setup ${github.user} ${portname} ${portversion}${tag_prefix}"
</span> }
default {
puts ""
</pre><pre style='margin:0'>
</pre>