View unanswered posts | View active topics



Reply to topic  [ 118 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next
Version number plugin 
Author Message
Member

Joined: Wed Mar 03, 2010 1:44 pm
Posts: 72
Location: LYON, FRANCE
Reply with quote
Hi all,

I'm coding a new plugin to manage version number or your project (Major, minor, build,...) as well as timestamp and author.
Output is a Version.as file updated at compile time

Version for FD4 http://bit.ly/efBjX3

Version for FD3 http://bit.ly/q09bHJ

Gimme feedback


Description
This plugin will generate a Version.as file at compile time with major, minor, build, SVN revision, timestamp and author informations.


What Version do:

* Update Versions.as file with :
- major version
- minor version
- build version
- SVN revision
- timestamp
- author
* Increments build number at compile time if compilation succeed
* Change class name of version file


What Version does NOT do:

* Compile with the next commit revision number
* fuck ups with package path when tracking new project


Thanks in advance to anyone who tries it out!


Tested on FlashDevelop versions:

* 4.0 Beta


Known Bugs/Issues

* Not updating build when using Flash IDE compilation.


Version History

/ 3.0.120 - October 26, 2011
+ build limitation set to 999 due to AIR limitation

/ 3.0.119 - August 29, 2011
* bug fix in reading Version.as if xml is deleted

/ 3.0.114 - July 12, 2011
* change to support new Air version number attribute

/ 3.0.112 - July 5, 2011
* Update to v3 for FlashDevelop 4

/ 2.0.106 - May 12, 2011
* change static public to public static

/ 2.0.102 - February 4, 2011
* bug fix in package not saved to xml
* path entry dialog simplified

/ 2.0.87 - February 3, 2011
* major changes in holding config data, now in seperate xml file

/ 1.0.336 - February 1, 2011
* bug fix in writting revision data

/ 1.0.332 - January 6, 2011
* bug fix with SVN checking at compilation
* bug fix with decementing build on error

/ 1.0.330 - January 6, 2011
+ Will check SVN rev at each compilation start so if SVN has been committed or updated, rev will be updated

/ 1.0.329 - January 4, 2011
+ Getting SVN rev from project path if available and version.as has not been created yet

/ 1.0.327 - January 4, 2011
* Ugly trace message removed

/ 1.0.326 - January 4, 2011
* UI improvements

/ 1.0.324 - January 4, 2011
* Bug fixes and improvements of package path

/ 1.0.304 - January 3, 2011
* AIR Namespace detection routine changed

/ 1.0.302 - December 30, 2010
+ Added a namespace detection for Air application.xml

/ 1.0.290 - December 21, 2010
+ Now AS2 compatible

/ 1.0.285 - December 16, 2010
+ Online check of new version of this plugin

/ 1.0.284 - December 15, 2010
* SVN Rev number is now taken from the revision of the version file

/ 1.0.283 - December 10, 2010
* Bug while plugin is loading for the first time is now fixed

/ 1.0.269 - December 8, 2010
+ automatic version file discovery and add to tracked project

/ 1.0.254 - June 25, 2010
* major fuckup fixed : version was lost when checking existing version file

/ 1.0.252 - June 14, 2010
+ Check consistency of ignored projects and tracked projetcs lists

/ 1.0.188 - June 3, 2010
+ Link in panel to track project

/ 1.0.137 - May 10, 2010
+ Relative now allowed when project added to tracked projects

/ 1.0.124 - May 4, 2010
+ New setting to allow update at testing, build or both

/ 1.0.123 - April 27, 2010
* Implementation of SharpSvn instead of homemade trick to read revision
* Change the maximum value for major, minor and build NumericUpDown controls

/ 1.0.112 - April 26, 2010
* Version file is now encoded using default encoding
+ New feature to support AIR application.xml file update

/ 1.0.105 - April 8, 2010
+ New setting to disable auto increment build number

/ 1.0.103 - March 31, 2010
+ New setting to define class name of version file

/ 1.0.96 - March 29, 2010
* Fix a regexp problem with date format that didn't update timestamp
* Fix a no reset of build values when creating a new project

/ 1.0.75 - March, 2010
- initial implementation of Version


Sources

* http://bit.ly/eUo1uS


Last edited by lamenace on Wed Oct 26, 2011 8:38 am, edited 30 times in total.



Wed Mar 03, 2010 1:53 pm
Profile
Member

Joined: Thu Mar 04, 2010 10:46 am
Posts: 6
Reply with quote
It works very well - thank you for sharing.

It would be good if you could specify the package in which to put the Version class - I got around it by changing the source path in the Version plugin settings, and then editing the package in the Version.as file when it had exported - it didn't then overwrite the package as I feared it might.

Cheers,
James


Thu Mar 04, 2010 10:50 am
Profile
Member

Joined: Wed Mar 03, 2010 1:44 pm
Posts: 72
Location: LYON, FRANCE
Reply with quote
hmm strange...when it asks you the path where you want to place Version.as it should set the package correctly.
By default path is src, but if you set .../src/truite then it should write package truite {..}


Thu Mar 04, 2010 10:56 am
Profile
Member

Joined: Wed Mar 03, 2010 1:44 pm
Posts: 72
Location: LYON, FRANCE
Reply with quote
Updated :
+ Package can be specified when adding to project
+ Button added to read SVN revision (no update done)


Thu Mar 04, 2010 5:08 pm
Profile
Moderator

Joined: Mon Jul 06, 2009 8:14 am
Posts: 258
Reply with quote
Nice plugin. IMHO, it, or some similar plugin, should be added to the main tree.

I've noticed the revision number is only updated when changing some of the other version components.

Also, it would be nice if you'd add some more features like being able to define other versioning schemes, for example, I often like to use Major.Minor.DayOfTheYear.HourMinutes.


Sat Mar 06, 2010 10:37 am
Profile
Member

Joined: Wed Mar 03, 2010 1:44 pm
Posts: 72
Location: LYON, FRANCE
Reply with quote
There is a timestamp that you could use for your DayOfTheYear and HourMinutes


Mon Mar 15, 2010 1:11 pm
Profile
Member

Joined: Thu Mar 25, 2010 10:19 pm
Posts: 12
Reply with quote
Hi! Thank you for this plugin, but Timestamp does not updates every time i compile project. Is it bug or feature?


Thu Mar 25, 2010 10:23 pm
Profile
Member

Joined: Wed Mar 03, 2010 1:44 pm
Posts: 72
Location: LYON, FRANCE
Reply with quote
does the major, minor and build number update each time ?
if yes then its strange if no then there is a problem with the path to your Version.as file


Fri Mar 26, 2010 8:17 am
Profile
Member

Joined: Thu Mar 25, 2010 10:19 pm
Posts: 12
Reply with quote
Yes, build number updates each time...


Fri Mar 26, 2010 6:02 pm
Profile
Member

Joined: Wed Mar 03, 2010 1:44 pm
Posts: 72
Location: LYON, FRANCE
Reply with quote
ewww maybe your date format doesn't match the reg exp because its not the same as here
can you paste it please?


Fri Mar 26, 2010 6:06 pm
Profile
Member

Joined: Thu Mar 25, 2010 10:19 pm
Posts: 12
Reply with quote
Code:
package
{
  public final class Version
  {
      static public const Major:int = 1;
      static public const Minor:int = 0;
      static public const Build:int = 43;
      static public const Revision:int = 0;
      static public const Timestamp:String = "26.03.2010 21:31:28";
      static public const Author:String = "HraD";
  }
}


Timestamp does not updates neither 3.0.6 nor 3.1.0.905
And another bug: i start FD, open versioned project, compile it and see, that build changed, for example, to 1.0.43. Then i create another empty project and version it. After compiling a new one, it's version is 1.0.44, not 1.0.0 as expected.


Fri Mar 26, 2010 6:37 pm
Profile
Member

Joined: Wed Mar 03, 2010 1:44 pm
Posts: 72
Location: LYON, FRANCE
Reply with quote
k there's a problem with date format and switching to a new project does not reset numbers


Sat Mar 27, 2010 5:06 pm
Profile
Member

Joined: Wed Jan 14, 2009 3:11 pm
Posts: 9
Reply with quote
Hi lamenace,

it is possible, in one of the next realeses, to add a feature that the user let select an kind of class (flash, php or other). I use fd often to write my php classes and i find the plugin is very well.

So i would use it for my php developing to.

greez

Tom


Sat Apr 03, 2010 11:03 am
Profile
Member

Joined: Wed Mar 03, 2010 1:44 pm
Posts: 72
Location: LYON, FRANCE
Reply with quote
i should put code on google code so you could be able to tweak it, but as i'm not coding php i won't loose time doing it myself


Sat Apr 03, 2010 1:48 pm
Profile
Member

Joined: Wed Jan 14, 2009 3:11 pm
Posts: 9
Reply with quote
Hi lamenace,

can you give us the uri?

Tom


Sat Apr 03, 2010 2:07 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 118 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.