Skip to content

Commit

Permalink
Version 1.0.0: Added new ChangeLog and VERSION files for tracking cha…
Browse files Browse the repository at this point in the history
…nges between versions. Also added get_version() subroutine for reading version number from VERSION.
  • Loading branch information
soh-cah-toa committed Oct 18, 2011
1 parent 209ef8e commit 004b3a1
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
9 changes: 9 additions & 0 deletions ChangeLog
@@ -0,0 +1,9 @@
2011-10-18 Kevin Polulak <kpolulak@gmail.com>
* Version 1.0.0
- New interactive command-line interface
- Improved documentation
- Various code cleanups

2009-04-23 Geoffrey Broadwell <geoff@broadwell.org>
* Version 0.0.0
- Initial commit
1 change: 1 addition & 0 deletions VERSION
@@ -0,0 +1 @@
1.0.0
30 changes: 29 additions & 1 deletion src/plumage.nqp
Expand Up @@ -160,6 +160,34 @@ our %OPTIONS; # Command-line switches
my %*CONF; # Configuration options my %*CONF; # Configuration options
my %*BIN; # System binaries my %*BIN; # System binaries


sub get_version() {
my $file := 'VERSION';
my $version;

# Read string from 'VERSION' and store it in $version
Q:PIR {
$P0 = find_lex '$file'
$S0 = $P0
load_bytecode 'String/Utils.pbc'
$P1 = new 'FileHandle'
$S1 = $P1.'readall'($S0)
$P1.'close'()
.local pmc chomp
chomp = get_global ['String';'Utils'], 'chomp'
$S1 = chomp($S1)
$P2 = new 'String'
$P2 = $S1
store_lex '$version', $P2
};
return $version;
}
sub load_libraries() { sub load_libraries() {
# Object-oriented interface # Object-oriented interface
pir::load_bytecode('P6object.pbc'); pir::load_bytecode('P6object.pbc');
Expand Down Expand Up @@ -431,7 +459,7 @@ sub command_version() {
} }


sub version_info() { sub version_info() {
my $version := '0'; my $version := get_version();
return return
"This is Plumage, version $version. "This is Plumage, version $version.
Expand Down

0 comments on commit 004b3a1

Please sign in to comment.