Version number for psake

11 views
Skip to first unread message

Patrick van der Velde

unread,
Sep 30, 2009, 6:32:22 PM9/30/09
to psak...@googlegroups.com
Hi All

I was just wondering if it would make sense to have a method in psake
that can return the version number of the currently loaded psake
module. I'm currently in the process of switching from one psake
version to another. In order to make sure that I get the right version
I now have to force an unload of the psake module and then reload the
correct module. However it would be cool if we could simply check the
version number and make decisions based on that.

Any thoughts on this?

Thanks

Patrick

Jorge Matos

unread,
Sep 30, 2009, 6:51:50 PM9/30/09
to psak...@googlegroups.com
I'm working on that right now - when the psake module loads (via import-module) it will export a powershell variable called $psake that is a hashtable.  One of the items in the hashtable will be the version number.  So from a script you will be able to access it with code like this "$psake.version".

I'll be committing a new version of the module in the next few days with this change among others.
--
Jorge Matos
Senior .NET Architect, MCSD.NET, MCSD Visual Studio 6.0
(440) 666-3107
jma...@bennettadelson.com    
matos...@hotmail.com      
Blog: http://jorgelmatos.blogspot.com
--------------------------------------------------------------------------------
BENNETT ADELSON
Microsoft Solution Center
6050 Oak Tree Blvd. Suite 150
Cleveland, Ohio 44131
(216) 369-0140
www.bennettadelson.com
--------------------------------------------------------------------------------
"Any intelligent fool can make things bigger and more complex...
It takes a touch of genius - and a lot of courage to
move in the opposite direction."... - Albert Einstein
--------------------------------------------------------------------------------

Patrick van der Velde

unread,
Sep 30, 2009, 6:56:57 PM9/30/09
to psak...@googlegroups.com
Hi Jorge

Thanks!!!!! That sounds really good. Will this next version also
include the change from Run-psake to Invoke-psake?

Regards

Patrick

James Kovacs

unread,
Sep 30, 2009, 7:17:22 PM9/30/09
to psak...@googlegroups.com
In a related vein on versioning... It's sounding like both the PowerShell v1 and v2 versions of psake are relatively stable. So I was thinking of:
  • tagging "master" as v1.0, which is compatible with PowerShell v1.
  • merging the psake-ps2 branch into master and tagging that as v2.0, which is compatible with PowerShell v2.
  • Ongoing development would be on master, which would now be PowerShell v2.
  • As master gets new features, we would tag v2.1, v2.2, etc.
Thoughts?

James
--
James Kovacs, B.Sc., M.Sc., MCSD, MCT
Microsoft MVP - Solutions Architect
http://www.jameskovacs.com
jko...@post.harvard.edu
403-397-3177 (mobile)

Jorge Matos

unread,
Oct 1, 2009, 2:16:35 AM10/1/09
to psak...@googlegroups.com
Yes it will, I'll provide a list of changes to the module when I commit, but
at the top of my head the list should be:

1) Rename Run-psake to Invoke-psake
2) Timing report is always shown
3) All global variables replaced with script-level variables
4) All exported functions are advanced functions with comment help
5) Detailed errors are optionally logged to a file
6) Updated psake-builderTester.ps1
7) New $psake hashtable variable mentioned below
8) The text "Build Succeeded" is displayed at the end of a good build

I should be committing this within the next few days.

--------------------------------------------------
From: "Patrick van der Velde" <petrikva...@gmail.com>
Sent: Wednesday, September 30, 2009 5:56 PM
To: <psak...@googlegroups.com>
Subject: Re: Version number for psake

Jorge Matos

unread,
Oct 1, 2009, 2:20:53 AM10/1/09
to psak...@googlegroups.com
Sounds like a plan.  I can wait till you've merged psake-ps2 branch into master and I'll try to push my changes to master.  I think Git is cool, the more I read about it the more I like it.

Sent: Wednesday, September 30, 2009 6:17 PM
Subject: Re: Version number for psake

Reply all
Reply to author
Forward
0 new messages