New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PATCH Fix bug #68752, make perl6 --version more informative #1554
Comments
From quester.pm@gmail.comHello, I noticed that perl6 -v (--version) doesn't currently say very much, and the $ alpha -v Copyright 2006-2010, The Perl Foundation. $ amsterdam -v There is an existing Perl6 bug report from August 2009 on the same topic, The attached patch changes the output from Amsterdam's format to this: $ rakudo -v All of the new perl6 -v information is built as say "..." statements The first three lines of perl6 -v output are simply copied from a new file, This is Rakudo Perl 6, development release #27 "Copenhagen" The next git commit sent after the tarball is created should switch back to The next four lines are taken from git branch and git show, which are run The copyright line is a constant built into Compiler_Version_Setup.pl, The last line of output is supplied by PCT. This is my first patch to Perl6 and I must admit that I am guessing at some Best regards, |
From quester.pm@gmail.com0001-Change-perl6-version-to-include-info-from-git-show-a.patchFrom 4d17764f03f69e7e86a592555408dd85c0595439 Mon Sep 17 00:00:00 2001
From: quester <quester.pm@gmail.com>
Date: Fri, 26 Feb 2010 06:08:41 -1000
Subject: [PATCH] Change perl6 --version to include info from git show, and from a new RELEASE file. -- quester
---
RELEASE | 3 ++
build/Makefile.in | 16 ++++++++---
docs/release_guide.pod | 6 ++++
src/Perl6/Compiler.pir | 9 ++++++
src/Perl6/Compiler_Version_Setup.pl | 49 +++++++++++++++++++++++++++++++++++
5 files changed, 79 insertions(+), 4 deletions(-)
create mode 100644 RELEASE
create mode 100644 src/Perl6/Compiler_Version_Setup.pl
diff --git a/RELEASE b/RELEASE
new file mode 100644
index 0000000..5edab2f
--- /dev/null
+++ b/RELEASE
@@ -0,0 +1,3 @@
+This is a DEVELOPMENT version of Rakudo Perl 6. It is based on the
+"rakudo-ng" development branch and is expected to evolve into
+development release #27 "Copenhagen" about March 18, 2010.
diff --git a/build/Makefile.in b/build/Makefile.in
index cb8b459..da13b47 100644
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -46,6 +46,7 @@ OPS_DIR = src/ops
PERL6_LANG_DIR = $(PARROT_LIB_DIR)/languages/perl6
# files we create
+PERL6_PIR = src/gen/compiler.pir
PERL6_PBC = perl6.pbc
PERL6_EXE = perl6$(EXE)
PERL6_G = src/gen/perl6-grammar.pir
@@ -61,7 +62,9 @@ DYNOPS = \
$(OPS_DIR)/$(OPS)_switch$(LOAD_EXT) \
SOURCES = \
+ RELEASE \
src/Perl6/Compiler.pir \
+ src/Perl6/Compiler_Version_Setup.pl \
src/gen/builtins.pir \
src/gen/cheats.pir \
src/gen/signature_pm.pir \
@@ -239,6 +242,7 @@ OPS_SOURCE = perl6.ops
CLEANUPS = \
*.manifest \
*.pdb \
+ $(PERL6_PIR) \
$(PERL6_PBC) \
$(PERL6_EXE) \
perl6.c \
@@ -293,16 +297,20 @@ $(PERL6_EXE): $(PERL6_PBC)
$(PBC_TO_EXE) $(PERL6_PBC)
# the complete compiler, including core/setting
-$(PERL6_PBC): $(S1_PERL6_PBC) src/gen/core.pm
+$(PERL6_PBC): $(S1_PERL6_PBC) src/gen/core.pm $(PERL6_PIR)
$(PARROT) $(PARROT_ARGS) $(S1_PERL6_PBC) --target=pir \
src/gen/core.pm > $(CORE_PIR)
- $(PARROT) $(PARROT_ARGS) -o $(PERL6_PBC) src/Perl6/Compiler.pir
+ $(PARROT) $(PARROT_ARGS) -o $(PERL6_PBC) $(PERL6_PIR)
# the stage-1 compiler
-$(S1_PERL6_PBC): $(PARROT) $(SOURCES)
+$(S1_PERL6_PBC): $(PARROT) $(SOURCES) $(PERL6_PIR)
$(PERL) -e "" > $(CORE_PIR)
@win32_libparrot_copy@
- $(PARROT) $(PARROT_ARGS) -o $(S1_PERL6_PBC) src/Perl6/Compiler.pir
+ $(PARROT) $(PARROT_ARGS) -o $(S1_PERL6_PBC) $(PERL6_PIR)
+
+$(PERL6_PIR): src/Perl6/Compiler.pir src/Perl6/Compiler_Version_Setup.pl RELEASE
+ $(PERL) src/Perl6/Compiler_Version_Setup.pl src/Perl6/Compiler.pir \
+ > $(PERL6_PIR)
$(PERL6_G): $(NQP_EXE) src/Perl6/Grammar.pm
$(NQP_EXE) --target=pir --output=$(PERL6_G) --encoding=utf8 \
diff --git a/docs/release_guide.pod b/docs/release_guide.pod
index 42d0791..04329b7 100644
--- a/docs/release_guide.pod
+++ b/docs/release_guide.pod
@@ -155,6 +155,12 @@ you find any steps that are missing.
$ git commit docs/release_guide.pod
+Also, update the RELEASE file. This sets the output of perl6 -v
+or perl6 --version, except for the last two lines (copyright
+and PCT/Parrot version.)
+
+ $ git commit RELEASE
+
=item 7.
Make sure everything compiles and runs from a known clean state:
diff --git a/src/Perl6/Compiler.pir b/src/Perl6/Compiler.pir
index 86c581f..f7385f4 100644
--- a/src/Perl6/Compiler.pir
+++ b/src/Perl6/Compiler.pir
@@ -136,6 +136,15 @@ Perl6::Compiler - Perl6 compiler
.return (module)
.end
+# This overrides the version method in PCT::HLLCompiler
+.sub 'version' :method
+ say 'This is Rakudo Perl 6' # This line modified by src/Perl6/Compiler_Version_Setup.pl
+ $P0 = getattribute self, '$version'
+ say $P0
+ exit 0
+.end
+
+
.sub 'main' :main
.param pmc args_str
$P0 = compreg 'perl6'
diff --git a/src/Perl6/Compiler_Version_Setup.pl b/src/Perl6/Compiler_Version_Setup.pl
new file mode 100644
index 0000000..38b7661
--- /dev/null
+++ b/src/Perl6/Compiler_Version_Setup.pl
@@ -0,0 +1,49 @@
+#! perl -n
+
+# Put the compiler version information, used for perl6 -v, into Compiler.pir.
+
+# CAUTION: if you enable strict or warnings you might wind up with
+# Perl 5 error messages in the output file, src/gen/compiler.pir.
+
+# Look for a file named RELEASE and use its contents.
+# Then display some information from git branch and git show, if available.
+
+# The ending year in the copyright line (Copyright (C) 2008-2010)
+# will be taken from the year of the git commit, if available.
+# If not, just open the README file and use its entire copyright line.
+
+if ( not /Compiler_Version_Setup.pl/i ) {
+ print $_;
+} else {
+ open my $release, "<", "RELEASE"
+ or die "Cannot open RELEASE for input";
+ while ( <$release> ) {
+ s/[\r\n]+//g;
+ s/"/\\"/g;
+ print qq{ say "$_"\n};
+ }
+ close $release;
+ my ( @git_branch, @git_show, $year );
+ if ( @git_branch = split " ", `git branch` ) {
+ print qq{ say "It is from the git $git_branch[1] branch:"\n};
+ }
+ if ( @git_show = split "\n", `git show` ) {
+ $git_show[$_] =~ s/"/\\"/g for ( 0, 1, 2 );
+ print qq{ say " $git_show[$_]"\n} for ( 0, 1, 2 );
+ $git_show[2] =~ / (\d{4}) /;
+ $year = $1;
+ print qq{ say "Rakudo Perl 6 is Copyright (C) 2008-$year,},
+ qq{ The Perl Foundation."\n}
+ if $year;
+ }
+ if (not $year) {
+ open my $readme, "<", "README"
+ or die "Cannot open README for input";
+ while ( <$readme> ) {
+ s/[\r\n]+//g;
+ s/"/\\"/g;
+ print qq{ say "$_"\n} if /Copyright/i;
+ }
+ close $readme;
+ }
+}
--
1.6.6
:q!
|
From quester.pm@gmail.comHello, Thanks to pmichaud++ and masak++ for pointing me in the right direction ****** I noticed that perl6 -v (--version) doesn't currently say very much, and the $ alpha -v Copyright 2006-2010, The Perl Foundation. $ amsterdam -v There is an existing Perl6 bug report from August 2009 on the same topic, The attached patch changes the output from Amsterdam's format to this: $ perl6 --version All of the new perl6 -v information is built as static PIR say "..." The first three lines of perl6 --version output above are in a string This is Rakudo Perl 6, development release #27 "Copenhagen" The next git commit sent after the tarball is created needs another manual The next line is taken from environment variables (host and user name) and The next four lines are taken from git branch and git show, which are run The copyright line is another string constant built into build/ The last line of output is supplied by PCT. Best regards, |
From @questerPatch (from git format-patch origin) |
From @quester0001-perl6-v-to-include-description-git-info-build-time-l.patchFrom 1cc1f3c4e4a9f736c3077532dfec79721b581fbc Mon Sep 17 00:00:00 2001
From: quester <quester.pm@gmail.com>
Date: Sun, 7 Mar 2010 15:43:30 -1000
Subject: [PATCH] perl6 -v to include description, git info, build time/location
---
build/Makefile.in | 4 ++
build/gen_version_pir.pl | 114 ++++++++++++++++++++++++++++++++++++++++++++++
docs/release_guide.pod | 44 ++++++++++++++----
3 files changed, 152 insertions(+), 10 deletions(-)
create mode 100644 build/gen_version_pir.pl
diff --git a/build/Makefile.in b/build/Makefile.in
index 902343e..f4c23bc 100644
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -155,6 +155,7 @@ CHEATS_PIR = \
src/cheats/parrot/Protoobject.pir \
src/cheats/parrot/P6role.pir \
src/gen/uprop-cheats.pir \
+ src/gen/version-cheats.pir \
src/cheats/parrot/register.pir \
CORE_SOURCES = \
@@ -362,6 +363,9 @@ src/gen/core.pm: build/gen_core_pm.pl $(CORE_SOURCES)
src/gen/uprop-cheats.pir: build/gen_uprop_pir.pl
$(PERL) build/gen_uprop_pir.pl > src/gen/uprop-cheats.pir
+src/gen/version-cheats.pir: build/gen_version_pir.pl
+ $(PERL) build/gen_version_pir.pl > src/gen/version-cheats.pir
+
#src/gen_metaop.pir: build/gen_metaop_pir.pl
# $(PERL) build/gen_metaop_pir.pl > src/gen_metaop.pir
#
diff --git a/build/gen_version_pir.pl b/build/gen_version_pir.pl
new file mode 100644
index 0000000..21692bb
--- /dev/null
+++ b/build/gen_version_pir.pl
@@ -0,0 +1,114 @@
+#! perl
+use strict;
+use warnings;
+
+# Put the compiler version information, used for perl6 -v,
+# into src/gen/version.pm.
+
+###########################################################################
+
+my $copyright_year = "2010";
+
+my $release = qq{
+
+ This is a development version of Rakudo Perl 6. It is based on the
+ "rakudo-ng" development branch and is expected to evolve into
+ development release #27 "Copenhagen" about March 18, 2010.
+
+};
+
+###########################################################################
+
+# Display the value of $release set above.
+# Then display some information from git branch and git show, if available.
+
+# The ending year in the copyright line (Copyright (C) 2008-20??)
+# will be taken from the year of the git commit, if it is available.
+# If not, use the value in $copyright_year.
+
+$release =~ s/\n\s+/\n/smg;
+$release =~ s/^\n//sm;
+$release =~ s/"/\\"/g;
+my @release = split '\n', $release;
+
+print "# This file was generated by $0\n";
+
+print q{
+ .macro_const RAKUDO_HLL 'perl6'
+
+ .HLL .RAKUDO_HLL
+
+ .loadlib 'perl6_group'
+ .loadlib 'perl6_ops'
+ .loadlib 'math_ops'
+
+ .namespace ['Perl6';'Compiler']
+
+ # This overrides the version method in PCT::HLLCompiler
+
+ .sub 'version' :method
+};
+
+print qq{ say "$_"\n} for @release;
+
+my $host = $ENV{HOSTNAME} || $ENV{COMPUTERNAME} || "";
+$host = " on $host" if $host;
+
+my $user = $ENV{USER} || $ENV{USERNAME} || "";
+$user = " by $user" if $user;
+
+no warnings 'exec';
+my $localtime = qx{/bin/date}
+ || ""; # DON'T use the Windows "date" command!
+use warnings;
+
+$localtime =~ s/[\r\n]//g;
+my $tz = $ENV{TZ} || "";
+$tz = " $tz" if $tz;
+$localtime = localtime() . $tz unless $localtime;
+
+print qq{ say "It was built $localtime$user$host"\n};
+
+# Try to include git info if possible.
+#
+# It is important to fail _gracefully_ if the user doesn't
+# have a .git directory (tarballs usually don't) or if the
+# # user doesn't have the git command at all.
+
+
+if ( -d ".git" ) {
+ no warnings 'exec';
+ my $git_branch = qx{git branch} || "";
+ use warnings;
+ my @git_branch = split "\n", $git_branch;
+ for (@git_branch) {
+ if (/^\*\s+([^ ]+)/) {
+ print qq{ say "It is from the git branch \\"$1\\""\n};
+ }
+ }
+ no warnings 'exec';
+ my $git_show = qx{git show} || "";
+ use warnings;
+ if ( my @git_show = split "\n", $git_show ) {
+ $git_show[$_] =~ s/"/\\"/g for ( 0, 1, 2 );
+ print qq{ say " $git_show[$_]"\n} for ( 0, 1, 2 );
+ $git_show[2] =~ / (\d{4}) /;
+ $copyright_year = $1;
+ } else {
+ print qq{ say "Git commit information is not available."\n};
+ }
+} else {
+ # This may confuse casual users more that it helps,
+ # comment out if that seems to be the case.
+ print qq{ say "It was not built from a git branch."\n};
+}
+
+print qq{ say "Rakudo Perl 6 is Copyright (C) 2008-$copyright_year,},
+ qq{ The Perl Foundation."\n};
+
+print q{
+ $P0 = getattribute self, '$version'
+ say $P0
+ exit 0
+ .end
+};
diff --git a/docs/release_guide.pod b/docs/release_guide.pod
index 0f8414c..835908a 100644
--- a/docs/release_guide.pod
+++ b/docs/release_guide.pod
@@ -157,6 +157,15 @@ you find any steps that are missing.
=item 7.
+Also, update the settings of $release and $copyright_year near
+the top of build/gen_version_pir.pl. This sets the beginning
+of the output of perl6 -v or perl6 --version. If this is a
+monthly or final release, make sure $release says so.
+
+ $ git commit build/gen_version_pir.pl
+
+=item 8.
+
Make sure everything compiles and runs from a known clean state:
$ make realclean
@@ -170,26 +179,26 @@ Often this means fixing a bug, fudging a test, or (temporarily?)
commenting out a test file in t/spectest.data . Use your best
judgment or ask others if uncertain what to do here.
-=item 8.
+=item 9.
Make sure any locally modified files have been pushed back to github.
$ git status
$ git push
-=item 9.
+=item 10.
Create an initial tarball by entering C<make release VERSION=YYYY.MM>,
where YYYY-MM is the month for which the release is being made.
This will create a candidate tarball file named <rakudo-YYYY.MM.tgz>.
-=item 10.
+=item 11.
Unpack the tar file into another area, and test that it
builds and runs properly. If there are any problems,
fix them and go back to step 7.
-=item 11.
+=item 12.
Tag the release by its release month ("MMMM.YY") and its code name.
@@ -197,26 +206,41 @@ Tag the release by its release month ("MMMM.YY") and its code name.
$ git tag -a -m"tag release #nn" CODENAME # e.g., "Bratislava"
$ git push --tags
-=item 12.
+=item 13.
Upload the release tarball to github's download area at
L<http://github.com/rakudo/rakudo/downloads>.
-=item 13.
+=item 14.
+
+Update the setting of $release again, near the top of
+build/gen_version_pir.pl. Have it state that this a
+development version, based on [the name and date of the
+release you just pushed], evolving towards [the name and
+target date of the next release.]
+
+ $ git commit build/gen_version_pir.pl
+
+Push this back to github.
+
+ $ git status
+ $ git push
+
+=item 15.
Publish the release announcement (from #5) above to appropriate
locations, including rakudo.org, use.perl, perl6-language,
perl6-announce, perl6-users, and others.
-=item 14.
+=item 16.
Update the Wikipedia entry at L<http://en.wikipedia.org/wiki/Rakudo>.
-=item 15.
+=item 17.
Promote the release anywhere else you think appropriate.
-=item 16.
+=item 18.
You're done! Celebrate with the appropriate amount of fun.
@@ -224,7 +248,7 @@ You're done! Celebrate with the appropriate amount of fun.
=head1 COPYRIGHT
-Copyright (C) 2009, The Perl Foundation.
+Copyright (C) 2010, The Perl Foundation.
=cut
--
1.6.6.1
|
From @quester#73148 replaced this patch. |
The RT System itself - Status changed from 'new' to 'open' |
From @questerCorrection: #73418 replaced this patch. |
From @moritzThanks, this looks like an interesting patch. Since Patrick is our |
The RT System itself - Status changed from 'new' to 'open' |
From quester.pm@gmail.comMoritz, Thank you very much. - Ira Byerly On Mon, Mar 8, 2010 at 7:03 AM, Moritz Lenz via RT <
|
From @questerHere is a revised version of the patch that deals better with variations |
From @quester0001-perl6-v-including-and-git-and-build-info.patchFrom 73a1afcff7a60062c40b1344deb16f65f4a73e5a Mon Sep 17 00:00:00 2001
From: quester <quester.pm@gmail.com>
Date: Tue, 23 Mar 2010 00:58:52 -1000
Subject: [PATCH] perl6 -v including and git and build info
---
build/Makefile.in | 4 ++
build/gen_version_pir.pl | 115 ++++++++++++++++++++++++++++++++++++++++++++++
docs/release_guide.pod | 44 ++++++++++++++----
3 files changed, 153 insertions(+), 10 deletions(-)
create mode 100644 build/gen_version_pir.pl
diff --git a/build/Makefile.in b/build/Makefile.in
index d1f79f4..dfc6d27 100644
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -154,12 +154,13 @@ CHEATS_PIR = \
src/cheats/want-caller-side-callsig.pir \
src/cheats/parrot-role-quirks.pir \
src/cheats/parrot/attriter.pir \
src/cheats/parrot/Protoobject.pir \
src/cheats/parrot/P6role.pir \
src/gen/uprop-cheats.pir \
+ src/gen/version-cheats.pir \
src/cheats/parrot/register.pir \
CORE_SOURCES = \
src/core/traits.pm \
src/core/operators.pm \
src/cheats/trait-export.pm \
@@ -379,12 +380,15 @@ src/gen/cheats.pir: build/gen_cheats_pir.pl $(CHEATS_PIR)
src/gen/core.pm: build/gen_core_pm.pl $(CORE_SOURCES)
$(PERL) build/gen_core_pm.pl $(CORE_SOURCES) > src/gen/core.pm
src/gen/uprop-cheats.pir: build/gen_uprop_pir.pl
$(PERL) build/gen_uprop_pir.pl > src/gen/uprop-cheats.pir
+src/gen/version-cheats.pir: build/gen_version_pir.pl
+ $(PERL) build/gen_version_pir.pl > src/gen/version-cheats.pir
+
#src/gen_metaop.pir: build/gen_metaop_pir.pl
# $(PERL) build/gen_metaop_pir.pl > src/gen_metaop.pir
#
#src/gen_junction.pir: build/gen_junction_pir.pl
# $(PERL) build/gen_junction_pir.pl > src/gen_junction.pir
#
diff --git a/build/gen_version_pir.pl b/build/gen_version_pir.pl
new file mode 100644
index 0000000..d8303fe
--- /dev/null
+++ b/build/gen_version_pir.pl
@@ -0,0 +1,115 @@
+#! perl
+use strict;
+use warnings;
+
+# Put the compiler version information, used for perl6 -v,
+# into src/gen/version.pm.
+
+###########################################################################
+
+my $copyright_year = "2010";
+
+my $release = qq{
+
+ This is a development version of Rakudo Perl 6. It comes after
+ development release #27 "Copenhagen" (18-Mar-2010) and before
+ development release #28 (est. 22-Apr-2010.)
+
+};
+
+###########################################################################
+
+# Display the value of $release set above.
+# Then display some information from git branch and git show, if available.
+
+# The ending year in the copyright line (Copyright (C) 2008-20??)
+# will be taken from the year of the git commit, if it is available.
+# If not, use the value in $copyright_year.
+
+$release =~ s/\n\s+/\n/smg;
+$release =~ s/^\n//sm;
+$release =~ s/"/\\"/g;
+my @release = split '\n', $release;
+
+print "# This file was generated by $0\n";
+
+print q{
+ .macro_const RAKUDO_HLL 'perl6'
+
+ .HLL .RAKUDO_HLL
+
+ .loadlib 'perl6_group'
+ .loadlib 'perl6_ops'
+ .loadlib 'math_ops'
+
+ .namespace ['Perl6';'Compiler']
+
+ # This overrides the version method in PCT::HLLCompiler
+
+ .sub 'version' :method
+};
+
+print qq{ say "$_"\n} for @release;
+
+my $host = $ENV{HOSTNAME} || $ENV{COMPUTERNAME} || "";
+$host = " on $host" if $host;
+
+my $user = $ENV{USER} || $ENV{USERNAME} || "";
+$user = " by $user" if $user;
+
+no warnings 'exec';
+my $localtime = qx{/bin/date}
+ || ""; # DON'T use the Windows "date" command!
+use warnings;
+
+$localtime =~ s/[\r\n]//g;
+my $tz = $ENV{TZ} || "";
+$tz = " $tz" if $tz;
+$localtime = localtime() . $tz unless $localtime;
+
+print qq{ say "It was built $localtime$user$host"\n};
+
+# Try to include git info if possible.
+
+# It is important to fail _gracefully_ if the user doesn't
+# have a .git directory (tarballs usually don't) or if the
+# user doesn't have the git command at all.
+
+if ( -d ".git" ) {
+ no warnings 'exec';
+ my $git_branch = qx{git branch} || "";
+ use warnings;
+ my @git_branch = split "\n", $git_branch;
+ for (@git_branch) {
+ if (/^\*\s+([^ ]+)/) {
+ print qq{ say "It is from the git branch \\"$1\\""\n};
+ }
+ }
+ no warnings 'exec';
+ my $git_show = qx{git show} || "";
+ use warnings;
+ $git_show =~ s/"/\\"/g;
+ $git_show =~ s/\r//g;
+ $git_show =~ s/\n\n.*//s;
+ $git_show =~ s/date.*\b(2\d{3})\b.*?\n\K.*//si;
+ $copyright_year = $1 if $1;
+ if ( my @git_show = split "\n", $git_show ) {
+ print qq{ say " $_"\n} for @git_show;
+ } else {
+ print qq{ say "Git commit information is not available."\n};
+ }
+} else {
+ # This may confuse casual users more that it helps,
+ # comment out if that seems to be the case.
+ print qq{ say "It was not built from a git branch."\n};
+}
+
+print qq{ say "Rakudo Perl 6 is Copyright (C) 2008-$copyright_year,},
+ qq{ The Perl Foundation."\n};
+
+print q{
+ $P0 = getattribute self, '$version'
+ say $P0
+ exit 0
+ .end
+};
diff --git a/docs/release_guide.pod b/docs/release_guide.pod
index bf5f749..82f7aa3 100644
--- a/docs/release_guide.pod
+++ b/docs/release_guide.pod
@@ -154,12 +154,21 @@ Update the release dates and names at the top of this file
you find any steps that are missing.
$ git commit docs/release_guide.pod
=item 7.
+Also, update the settings of $release and $copyright_year near
+the top of build/gen_version_pir.pl. This sets the beginning
+of the output of perl6 -v or perl6 --version. If this is a
+monthly or final release, make sure $release says so.
+
+ $ git commit build/gen_version_pir.pl
+
+=item 8.
+
Make sure everything compiles and runs from a known clean state:
$ make realclean
$ perl Configure.pl --gen-parrot
$ make
$ make test
@@ -167,67 +176,82 @@ Make sure everything compiles and runs from a known clean state:
Continue adjusting things until make spectest passes as expected.
Often this means fixing a bug, fudging a test, or (temporarily?)
commenting out a test file in t/spectest.data . Use your best
judgment or ask others if uncertain what to do here.
-=item 8.
+=item 9.
Make sure any locally modified files have been pushed back to github.
$ git status
$ git push
-=item 9.
+=item 10.
Create an initial tarball by entering C<make release VERSION=YYYY.MM>,
where YYYY.MM is the month for which the release is being made.
This will create a candidate tarball file named <rakudo-YYYY.MM.tgz>.
-=item 10.
+=item 11.
Unpack the tar file into another area, and test that it
builds and runs properly. If there are any problems,
fix them and go back to step 7.
-=item 11.
+=item 12.
Tag the release by its release month ("MMMM.YY") and its code name.
$ git tag -a -m"tag release #nn" MMMM.YY # e.g., 2010.02
$ git tag -a -m"tag release #nn" CODENAME # e.g., "Bratislava"
$ git push --tags
-=item 12.
+=item 13.
Upload the release tarball to github's download area at
L<http://github.com/rakudo/rakudo/downloads>.
-=item 13.
+=item 14.
+
+Update the setting of $release again, near the top of
+build/gen_version_pir.pl. Have it state that this a
+development version, based on [the name and date of the
+release you just pushed], evolving towards [the name and
+target date of the next release.]
+
+ $ git commit build/gen_version_pir.pl
+
+Push this back to github.
+
+ $ git status
+ $ git push
+
+=item 15.
Publish the release announcement (from #5) above to appropriate
locations, including rakudo.org, use.perl, perl6-language,
perl6-announce, perl6-users, and others.
-=item 14.
+=item 16.
Update the Wikipedia entry at L<http://en.wikipedia.org/wiki/Rakudo>.
-=item 15.
+=item 17.
Promote the release anywhere else you think appropriate.
-=item 16.
+=item 18.
You're done! Celebrate with the appropriate amount of fun.
=back
=head1 COPYRIGHT
-Copyright (C) 2009, The Perl Foundation.
+Copyright (C) 2010, The Perl Foundation.
=cut
# Local Variables:
# fill-column: 100
# End:
--
1.6.6.1
|
From @questerUpdated the comments for the Moscow/April release. (Also unbitrotted |
From @quester0001-RT-73148-Fix-perl-v.patchFrom b54df4c7328a928267402a19c447dea27c6c4574 Mon Sep 17 00:00:00 2001
From: quester <quester.pm@gmail.com>
Date: Tue, 27 Apr 2010 17:47:16 -1000
Subject: [PATCH] RT #73148 Fix perl -v
---
build/Makefile.in | 4 ++
build/gen_version_pir.pl | 115 ++++++++++++++++++++++++++++++++++++++++++++++
docs/release_guide.pod | 42 +++++++++++++----
3 files changed, 152 insertions(+), 9 deletions(-)
create mode 100644 build/gen_version_pir.pl
diff --git a/build/Makefile.in b/build/Makefile.in
index 30c7acf..376a3f5 100644
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -157,6 +157,7 @@ CHEATS_PIR = \
src/cheats/parrot/Protoobject.pir \
src/cheats/parrot/P6role.pir \
src/gen/uprop-cheats.pir \
+ src/gen/version-cheats.pir \
src/cheats/parrot/register.pir \
CORE_SOURCES = \
@@ -391,6 +392,9 @@ src/gen/core.pm: build/gen_core_pm.pl $(CORE_SOURCES)
src/gen/uprop-cheats.pir: build/gen_uprop_pir.pl
$(PERL) build/gen_uprop_pir.pl > src/gen/uprop-cheats.pir
+src/gen/version-cheats.pir: build/gen_version_pir.pl
+ $(PERL) build/gen_version_pir.pl > src/gen/version-cheats.pir
+
#src/gen_metaop.pir: build/gen_metaop_pir.pl
# $(PERL) build/gen_metaop_pir.pl > src/gen_metaop.pir
#
diff --git a/build/gen_version_pir.pl b/build/gen_version_pir.pl
new file mode 100644
index 0000000..45a7316
--- /dev/null
+++ b/build/gen_version_pir.pl
@@ -0,0 +1,115 @@
+#! perl
+use strict;
+use warnings;
+
+# Put the compiler version information, used for perl6 -v,
+# into src/gen/version.pm.
+
+###########################################################################
+
+my $copyright_year = "2010";
+
+my $release = qq{
+
+ This is a development version of Rakudo Perl 6. It comes after
+ development release #28 "Moscow" (22-Apr-2010) and before
+ development release #29 (est. 20-May-2010.)
+
+};
+
+###########################################################################
+
+# Display the value of $release set above.
+# Then display some information from git branch and git show, if available.
+
+# The ending year in the copyright line (Copyright (C) 2008-20??)
+# will be taken from the year of the git commit, if it is available.
+# If not, use the value in $copyright_year.
+
+$release =~ s/\n\s+/\n/smg;
+$release =~ s/^\n//sm;
+$release =~ s/"/\\"/g;
+my @release = split '\n', $release;
+
+print "# This file was generated by $0\n";
+
+print q{
+ .macro_const RAKUDO_HLL 'perl6'
+
+ .HLL .RAKUDO_HLL
+
+ .loadlib 'perl6_group'
+ .loadlib 'perl6_ops'
+ .loadlib 'math_ops'
+
+ .namespace ['Perl6';'Compiler']
+
+ # This overrides the version method in PCT::HLLCompiler
+
+ .sub 'version' :method
+};
+
+print qq{ say "$_"\n} for @release;
+
+my $host = $ENV{HOSTNAME} || $ENV{COMPUTERNAME} || "";
+$host = " on $host" if $host;
+
+my $user = $ENV{USER} || $ENV{USERNAME} || "";
+$user = " by $user" if $user;
+
+no warnings 'exec';
+my $localtime = qx{/bin/date}
+ || ""; # DON'T use the Windows "date" command!
+use warnings;
+
+$localtime =~ s/[\r\n]//g;
+my $tz = $ENV{TZ} || "";
+$tz = " $tz" if $tz;
+$localtime = localtime() . $tz unless $localtime;
+
+print qq{ say "It was built $localtime$user$host"\n};
+
+# Try to include git info if possible.
+
+# It is important to fail _gracefully_ if the user doesn't
+# have a .git directory (tarballs usually don't) or if the
+# user doesn't have the git command at all.
+
+if ( -d ".git" ) {
+ no warnings 'exec';
+ my $git_branch = qx{git branch} || "";
+ use warnings;
+ my @git_branch = split "\n", $git_branch;
+ for (@git_branch) {
+ if (/^\*\s+([^ ]+)/) {
+ print qq{ say "It is from the git branch \\"$1\\""\n};
+ }
+ }
+ no warnings 'exec';
+ my $git_show = qx{git show} || "";
+ use warnings;
+ $git_show =~ s/"/\\"/g;
+ $git_show =~ s/\r//g;
+ $git_show =~ s/\n\n.*//s;
+ $git_show =~ s/date.*\b(2\d{3})\b.*?\n\K.*//si;
+ $copyright_year = $1 if $1;
+ if ( my @git_show = split "\n", $git_show ) {
+ print qq{ say " $_"\n} for @git_show;
+ } else {
+ print qq{ say "Git commit information is not available."\n};
+ }
+} else {
+ # This may confuse casual users more that it helps,
+ # comment out if that seems to be the case.
+ print qq{ say "It was not built from a git branch."\n};
+}
+
+print qq{ say "Rakudo Perl 6 is Copyright (C) 2008-$copyright_year,},
+ qq{ The Perl Foundation."\n};
+
+print q{
+ $P0 = getattribute self, '$version'
+ say $P0
+ exit 0
+ .end
+};
diff --git a/docs/release_guide.pod b/docs/release_guide.pod
index 9dabd39..e9706a7 100644
--- a/docs/release_guide.pod
+++ b/docs/release_guide.pod
@@ -164,6 +164,15 @@ you find any steps that are missing.
=item 7.
+Also, update the settings of $release and $copyright_year near
+the top of build/gen_version_pir.pl. This sets the beginning
+of the output of perl6 -v or perl6 --version. If this is a
+monthly or final release, make sure $release says so.
+
+ $ git commit build/gen_version_pir.pl
+
+=item 8.
+
Make sure everything compiles and runs from a known clean state:
$ make realclean
@@ -177,26 +186,26 @@ Often this means fixing a bug, fudging a test, or (temporarily?)
commenting out a test file in t/spectest.data . Use your best
judgment or ask others if uncertain what to do here.
-=item 8.
+=item 9.
Make sure any locally modified files have been pushed back to github.
$ git status
$ git push
-=item 9.
+=item 10.
Create an initial tarball by entering C<make release VERSION=YYYY.MM>,
where YYYY.MM is the month for which the release is being made.
This will create a candidate tarball file named <rakudo-YYYY.MM.tgz>.
-=item 10.
+=item 11.
Unpack the tar file into another area, and test that it
builds and runs properly. If there are any problems,
fix them and go back to step 7.
-=item 11.
+=item 12.
Tag the release by its release month ("MMMM.YY") and its code name.
@@ -204,26 +213,41 @@ Tag the release by its release month ("MMMM.YY") and its code name.
$ git tag -a -m"tag release #nn" CODENAME # e.g., "Bratislava"
$ git push --tags
-=item 12.
+=item 13.
Upload the release tarball to github's download area at
L<http://github.com/rakudo/rakudo/downloads>.
-=item 13.
+=item 14.
+
+Update the setting of $release again, near the top of
+build/gen_version_pir.pl. Have it state that this a
+development version, based on [the name and date of the
+release you just pushed], evolving towards [the name and
+target date of the next release.]
+
+ $ git commit build/gen_version_pir.pl
+
+Push this back to github.
+
+ $ git status
+ $ git push
+
+=item 15.
Publish the release announcement (from #5) above to appropriate
locations, including rakudo.org, use.perl, perl6-language,
perl6-announce, perl6-users, and others.
-=item 14.
+=item 16.
Update the Wikipedia entry at L<http://en.wikipedia.org/wiki/Rakudo>.
-=item 15.
+=item 17.
Promote the release anywhere else you think appropriate.
-=item 16.
+=item 18.
You're done! Celebrate with the appropriate amount of fun.
--
1.7.0.4
|
From @questerUpdated the perl6 --version patch again for the Erlangen/May release. |
From @quester0001-RT-73148-Fix-perl-v-2010-06-11.patchFrom 6992c8c439681b80c010409215eef4ca5e2c3daa Mon Sep 17 00:00:00 2001
From: quester <quester.pm@gmail.com>
Date: Fri, 11 Jun 2010 01:56:05 -1000
Subject: [PATCH] Make perl6 --version patch mergable for 2010-06-11
---
build/Makefile.in | 4 ++
build/gen_version_pir.pl | 115 ++++++++++++++++++++++++++++++++++++++++++++++
docs/release_guide.pod | 42 +++++++++++++----
3 files changed, 152 insertions(+), 9 deletions(-)
create mode 100644 build/gen_version_pir.pl
diff --git a/build/Makefile.in b/build/Makefile.in
index 48eea9b..1a92b33 100644
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -163,6 +163,7 @@ CHEATS_PIR = \
src/cheats/parrot/Protoobject.pir \
src/cheats/parrot/P6role.pir \
src/gen/uprop-cheats.pir \
+ src/gen/version-cheats.pir \
src/cheats/parrot/register.pir \
CORE_SOURCES = \
@@ -381,6 +382,9 @@ src/gen/core.pm: build/gen_core_pm.pl $(CORE_SOURCES)
src/gen/uprop-cheats.pir: build/gen_uprop_pir.pl
$(PERL) build/gen_uprop_pir.pl > src/gen/uprop-cheats.pir
+src/gen/version-cheats.pir: build/gen_version_pir.pl
+ $(PERL) build/gen_version_pir.pl > src/gen/version-cheats.pir
+
$(PMC_DIR)/objectref.pmc : $(PMC_DIR)/objectref_pmc.template build/gen_objectref_pmc.pl
$(PERL) -I$(PARROT_PERL_LIB) build/gen_objectref_pmc.pl $(PMC_DIR)/objectref_pmc.template \
$(PMC_DIR)/objectref.pmc
diff --git a/build/gen_version_pir.pl b/build/gen_version_pir.pl
new file mode 100644
index 0000000..90b0ad2
--- /dev/null
+++ b/build/gen_version_pir.pl
@@ -0,0 +1,115 @@
+#! perl
+use strict;
+use warnings;
+
+# Put the compiler version information, used for perl6 -v,
+# into src/gen/version.pm.
+
+###########################################################################
+
+my $copyright_year = "2010";
+
+my $release = qq{
+
+ This is a development build of Rakudo Perl 6. It comes after
+ development release #29 "Erlangen" (2010-05-20) and before
+ development release #30 "Atlanta" (scheduled for 2010-06-17.)
+
+};
+
+###########################################################################
+
+# Display the value of $release set above.
+# Then display some information from git branch and git show, if available.
+
+# The ending year in the copyright line (Copyright (C) 2008-20??)
+# will be taken from the year of the git commit, if it is available.
+# If not, use the value in $copyright_year.
+
+$release =~ s/\n\s+/\n/smg;
+$release =~ s/^\n//sm;
+$release =~ s/"/\\"/g;
+my @release = split '\n', $release;
+
+print "# This file was generated by $0\n";
+
+print q{
+ .macro_const RAKUDO_HLL 'perl6'
+
+ .HLL .RAKUDO_HLL
+
+ .loadlib 'perl6_group'
+ .loadlib 'perl6_ops'
+ .loadlib 'math_ops'
+
+ .namespace ['Perl6';'Compiler']
+
+ # This overrides the version method in PCT::HLLCompiler
+
+ .sub 'version' :method
+};
+
+print qq{ say "$_"\n} for @release;
+
+my $host = $ENV{HOSTNAME} || $ENV{COMPUTERNAME} || "";
+$host = " on $host" if $host;
+
+my $user = $ENV{USER} || $ENV{USERNAME} || "";
+$user = " by $user" if $user;
+
+no warnings 'exec';
+my $localtime = qx{/bin/date}
+ || ""; # DON'T use the Windows "date" command!
+use warnings;
+
+$localtime =~ s/[\r\n]//g;
+my $tz = $ENV{TZ} || "";
+$tz = " $tz" if $tz;
+$localtime = localtime() . $tz unless $localtime;
+
+print qq{ say "It was built $localtime$user$host"\n};
+
+# Try to include git info if possible.
+
+# It is important to fail _gracefully_ if the user doesn't
+# have a .git directory (tarballs usually don't) or if the
+# user doesn't have the git command at all.
+
+if ( -d ".git" ) {
+ no warnings 'exec';
+ my $git_branch = qx{git branch} || "";
+ use warnings;
+ my @git_branch = split "\n", $git_branch;
+ for (@git_branch) {
+ if (/^\*\s+([^ ]+)/) {
+ print qq{ say "It is from the git branch \\"$1\\""\n};
+ }
+ }
+ no warnings 'exec';
+ my $git_show = qx{git show} || "";
+ use warnings;
+ $git_show =~ s/"/\\"/g;
+ $git_show =~ s/\r//g;
+ $git_show =~ s/\n\n.*//s;
+ $git_show =~ s/date.*\b(2\d{3})\b.*?\n\K.*//si;
+ $copyright_year = $1 if $1;
+ if ( my @git_show = split "\n", $git_show ) {
+ print qq{ say " $_"\n} for @git_show;
+ } else {
+ print qq{ say "Git commit information is not available."\n};
+ }
+} else {
+ # This may confuse casual users more that it helps,
+ # comment out if that seems to be the case.
+ print qq{ say "It was not built from a git branch."\n};
+}
+
+print qq{ say "Rakudo Perl 6 is Copyright (C) 2008-$copyright_year,},
+ qq{ The Perl Foundation."\n};
+
+print q{
+ $P0 = getattribute self, '$version'
+ say $P0
+ exit 0
+ .end
+};
diff --git a/docs/release_guide.pod b/docs/release_guide.pod
index 4de7397..7382800 100644
--- a/docs/release_guide.pod
+++ b/docs/release_guide.pod
@@ -163,6 +163,15 @@ you find any steps that are missing.
=item 7.
+Also, update the settings of $release and $copyright_year near
+the top of build/gen_version_pir.pl. This sets the beginning
+of the output of perl6 -v or perl6 --version. If this is a
+monthly or final release, make sure $release says so.
+
+ $ git commit build/gen_version_pir.pl
+
+=item 8.
+
Make sure everything compiles and runs from a known clean state:
$ make realclean
@@ -176,14 +185,14 @@ Often this means fixing a bug, fudging a test, or (temporarily?)
commenting out a test file in t/spectest.data . Use your best
judgment or ask others if uncertain what to do here.
-=item 8.
+=item 9.
Make sure any locally modified files have been pushed back to github.
$ git status
$ git push
-=item 9.
+=item 10.
Create an initial tarball by entering C<make release VERSION=YYYY.MM>,
where YYYY.MM is the month for which the release is being made.
@@ -193,13 +202,13 @@ B<Caution>: this steps removes your C<t/spec> directory and all files
contained therein, and replaces it by a fresh svn export. So please make a
backup if you have any important data in there.
-=item 10.
+=item 11.
Unpack the tar file into another area, and test that it
builds and runs properly. If there are any problems,
fix them and go back to step 7.
-=item 11.
+=item 12.
Tag the release by its release month ("MMMM.YY") and its code name.
@@ -207,26 +216,41 @@ Tag the release by its release month ("MMMM.YY") and its code name.
$ git tag -a -m"tag release #nn" CODENAME # e.g., "Bratislava"
$ git push --tags
-=item 12.
+=item 13.
Upload the release tarball to github's download area at
L<http://github.com/rakudo/rakudo/downloads>.
-=item 13.
+=item 14.
+
+Update the setting of $release again, near the top of
+build/gen_version_pir.pl. Have it state that this a
+development version, based on [the name and date of the
+release you just pushed], evolving towards [the name and
+target date of the next release.]
+
+ $ git commit build/gen_version_pir.pl
+
+Push this back to github.
+
+ $ git status
+ $ git push
+
+=item 15.
Publish the release announcement (from #5) above to appropriate
locations, including rakudo.org, use.perl, perl6-language,
perl6-announce, perl6-users, and others.
-=item 14.
+=item 16.
Update the Wikipedia entry at L<http://en.wikipedia.org/wiki/Rakudo>.
-=item 15.
+=item 17.
Promote the release anywhere else you think appropriate.
-=item 16.
+=item 18.
You're done! Celebrate with the appropriate amount of fun.
--
1.7.0.4
|
From @cokeOn Fri Jun 11 05:09:26 2010, quester wrote:
Looks like this style of output was not included, but we currently get: $ perl6 --version This is Rakudo Perl 6, version 2011.01-13-gfcc46ea built on parrot 3.0.0 RELEASE_3_0_0- Copyright 2008-2011, The Perl Foundation .. which looks pretty good to me. (has the date of the last release, the git-describe string, the Can we (gently) reject the patch and close the ticket? -- |
From @cokeOn Sun Jan 30 22:57:36 2011, coke wrote:
No complaints from pmichaud or sorear. -- |
@coke - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#73148 (status was 'resolved')
Searchable as RT73148$
The text was updated successfully, but these errors were encountered: