From ef4848e303bf2c64f0a7e6449ebe80bc8ba0e88e Mon Sep 17 00:00:00 2001 From: Pedro Figueiredo Date: Tue, 24 Sep 2013 09:52:50 +0100 Subject: [PATCH 1/6] Allow dashes in usernames --- bin/github-keygen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/github-keygen b/bin/github-keygen index aea0580..d1baad3 100755 --- a/bin/github-keygen +++ b/bin/github-keygen @@ -98,7 +98,7 @@ my %github_remove; while (@ARGV) { my $user = shift @ARGV; - pod2usage("invalid user '$user'") unless $user =~ /^[a-z0-9_]+$/; + pod2usage("invalid user '$user'") unless $user =~ /^[a-z0-9_-]+$/; my $remove = 0; my %u = ( From d4753728381c075cb2bc66bdbe90ed58ea6ba65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Tue, 24 Sep 2013 19:41:13 +0200 Subject: [PATCH 2/6] Changes for 1.009 --- README.pod | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.pod b/README.pod index ff4e6f5..b7dd72b 100644 --- a/README.pod +++ b/README.pod @@ -235,6 +235,10 @@ releases. And you can also have a look to the commit log. =over 4 +=item v1.009 + +Added support for dashes in Github usernames. Thanks Pedro Figueiredo! + =item v1.008 Added connection sharing: connection to Github is kept alive for 60 @@ -340,6 +344,9 @@ L: documentation patch. L: L that inspired changes in 1.008. +L: support for Github account with +dashes (v1.009). + If you want to contribute, have a look to L. =head1 COPYRIGHT & LICENSE From b0d51b830a0ff1e3949b3318c811e99953daf204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Tue, 24 Sep 2013 20:06:14 +0200 Subject: [PATCH 3/6] Fixes in CONTRIBUTING.pod Fix typo in NAME section. Add "FOR RELEASE MANAGER" section. --- CONTRIBUTING.pod | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.pod b/CONTRIBUTING.pod index 91713d2..53b6a1b 100644 --- a/CONTRIBUTING.pod +++ b/CONTRIBUTING.pod @@ -1,6 +1,6 @@ =head1 NAME -How to constribute to C? +How to contribute to C? =head1 DESCRIPTION @@ -23,7 +23,12 @@ submitted as pull requests at github. =item 2. Make your fix/feature git checkout -b devel - ... + + $EDITOR bin/github-keygen + + # Test... + bin/github-keygen ... + git commit =item 3. Setup a fork @@ -50,4 +55,27 @@ Redo step 2. and 4. =back +=head1 FOR RELEASE MANAGER + +=over 4 + +=item * Bump C<$VERSION> + + git checkout devel + # Bump version number + $EDITOR/bin/github-keygen + # Update changelog + $EDITOR README.pod + git add bin/github-keygen README.pod + git commit + +=item * Release + + git checkout devel + ./release.pl + git push origin devel release + git push origin --tags + +=back + =cut From ae8d36b4ccc7518433ea6deda4983bd3cd396fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Tue, 24 Sep 2013 21:05:29 +0200 Subject: [PATCH 4/6] release.pl: make a build tag instead of a real release If the current branch is not 'devel', create a build tag (named with the branch name followed by '.build') instead of a real release. This can help contributors who want to build a release just for testing. --- release.pl | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/release.pl b/release.pl index fa31e5d..afbd8f7 100755 --- a/release.pl +++ b/release.pl @@ -242,14 +242,30 @@ ($;@) say "new release commit: $new_release_commit"; -git 'update-ref' => 'refs/heads/release' => $new_release_commit, $release_commit; - -if ($version) { +my $branch = git 'symbolic-ref', 'HEAD'; + +# If we build from the 'devel' branch, update the 'release' branch +if ($branch eq 'refs/heads/devel') { + git 'update-ref' => 'refs/heads/release' => $new_release_commit, $release_commit; + + if ($version) { + git tag => -a => + -m => "Release v$version", + "v$version", + $new_release_commit; + say 'Done'. + say "You can now push: git push github devel release v$version"; + } else { + say "You can now push: git push github devel release"; + } +# Else: just create a tag to the build result, so we can check it out for +# testing +} else { + $branch =~ s{^refs/(?:heads|remotes/[^/]+)/}{}; git tag => -a => - -m => "Release v$version", - "v$version", + -m => "Build for branch $branch", + "$branch.build", $new_release_commit; + say "You can now check out the build: git checkout $branch.build"; } -say 'Done.'; -say "You can now push: git push github devel release v$version"; From 5b957c977584888132d9fef3599ac32ea4f04e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Tue, 24 Sep 2013 22:38:45 +0200 Subject: [PATCH 5/6] Bump version to 1.009 --- bin/github-keygen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/github-keygen b/bin/github-keygen index d1baad3..f8e1b8c 100755 --- a/bin/github-keygen +++ b/bin/github-keygen @@ -12,7 +12,7 @@ use Sys::Hostname; use constant HAS_TEXT_DIFF => eval { require Text::Diff; 1 }; -our $VERSION = '1.008'; +our $VERSION = '1.009'; use constant { PROG => (File::Spec->splitpath($0))[2], From e1b4767ebcdcfb9230600e89426b74a895293f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Tue, 24 Sep 2013 22:47:58 +0200 Subject: [PATCH 6/6] release.pl: build from 'HEAD' instead of 'devel' This should simplify work for contributors as they are expected to work on branches, not directly on 'devel'. --- release.pl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/release.pl b/release.pl index afbd8f7..56bfc38 100755 --- a/release.pl +++ b/release.pl @@ -171,13 +171,13 @@ ($;@) @ARGV, ); -my ($devel_commit) = git 'rev-parse' => 'devel'; -say "devel: $devel_commit"; +my ($HEAD_commit) = git 'rev-parse' => 'HEAD'; +say "HEAD: $HEAD_commit"; -my %devel_tree; -git 'ls-tree' => $devel_commit, sub { +my %HEAD_tree; +git 'ls-tree' => $HEAD_commit, sub { my ($mode, $type, $object, $file) = split; - $devel_tree{$file} = [ $mode, $type, $object ]; + $HEAD_tree{$file} = [ $mode, $type, $object ]; }; my %updated_files; @@ -189,10 +189,10 @@ ($;@) # Merge files updated in devel if ( $type eq 'blob' # Don't touch trees && $file ne '.gitignore' # One .gitignore for each branch - && exists $devel_tree{$file} - && $object ne $devel_tree{$file}[2]) { + && exists $HEAD_tree{$file} + && $object ne $HEAD_tree{$file}[2]) { say "- $file: $object (updated)"; - $release_tree{$file} = $devel_tree{$file}; + $release_tree{$file} = $HEAD_tree{$file}; $updated_files{$file} = 1; } else { say "- $file: $object"; @@ -234,7 +234,7 @@ ($;@) my $new_release_commit = git 'commit-tree', $new_release_tree, -p => $release_commit, - -p => $devel_commit, + -p => $HEAD_commit, # For maximum compat, don't use '-m' but STDIN \($version ? "Release v$version"