 |
| Author |
Message |
|
Neverbirth
Member
Joined: Mon Jul 06, 2009 8:14 am Posts: 71
|
 Re: AutoVersion
You'd have to raise the version yourself, however DeltaBaseYearDayOfYear doesn't work that way, it would be something like:
Dec 31st 2010: "1.35365.0.0" Jan 1st 2011: "1.36001.0.0"
Where 35/36 is the difference between the build year (2010/2011) and the project start date, which is configurable, but defaults to 1975 IIRC.
AFAIK, there is no versioning scheme that would cause what you say, none of them ever resets to 0, but I could be wrong, never used all of the styles.
EDIT: Well, the TimeStamp style could be a lower value, although I don't see why anyone would use it alone as a minor or build version number, I think it makes more sense to use it with some of the other styles.
|
| Thu Jul 29, 2010 12:16 pm |
|
 |
|
divillysausages
Member
Joined: Tue Nov 17, 2009 4:16 pm Posts: 21
|
 Re: AutoVersion
Hi Neverbirth, thanks for the reply. I think there's a bit of a bug with the Interface generation in FlashDevelop and the automatic code creation template in your plugin. I'm using this as my template: Code: package $(Package) $(CSLB){ /** $(CBI)* The $(FileName) class is an automatically generated class containing version information on the $(CBI)* current build of the engine. If you want to change how it's written out, change the template $(CBI)* C:/Users/[User]/AppData/Local/FlashDevelop/Templates/AutoVersion/ActionScript 3.fdt $(CBI)* $(CBI)* @see http://www.flashdevelop.org/community/viewtopic.php?f=4&t=6423 - FlashDevelop forum thread $(CBI)* @see http://code.google.com/p/autoversion/ - Autoversion Google code page $(CBI)* $(CBI)* @author $(DefaultUser) $(CBI)*/ public final class $(FileName) $(CSLB){ /** * The current version of the engine. This is auto-generated, so any changes will be overwritten */ static public const VERSION:String = "$(Major).$(Minor).$(Build).r$(Revision)"; } }
which generates this as code (BuildVersion.as): Code: package {main_package_path}.version { /** * The BuildVersion class is an automatically generated class containing version information on the * C:/Users/[User]/AppData/Local/FlashDevelop/Templates/AutoVersion/ActionScript 3.fdt * current build of the engine. If you want to change how it's written out, change the template * * @see http://www.flashdevelop.org/community/viewtopic.php?f=4&t=6423 - FlashDevelop forum thread * @see http://code.google.com/p/autoversion/ - Autoversion Google code page * * @author Damian */ public final class BuildVersion { /** * The current version of the engine. This is auto-generated, so any changes will be overwritten */ static public const VERSION:String = "1.0.224.r1417"; } }
Occasionally, though I create a new interface by going Right-click -> Add -> New Interface. I'd create an interface something like this: Code: package {main_package_path}.core { public interface IStaticGameObj { } }
When use the interface in a class and go to run the game I'll get 2 errors: Code: {path}\BuildVersion.as: Error: A file found in a source-path must have the same package structure '{main_package_path}.version', as the definition's package, '{main_package_path}.core'. {path}\BuildVersion.as: Error: A file found in a source-path 'BuildVersion' must have the same name as the class definition inside the file 'ITest'.
I open BuildVersion.as and the code is now: Code: package {main_package_path}.core { /** * The ITest class is an automatically generated class containing version information on the * current build of the engine. If you want to change how it's written out, change the template * C:/Users/[User]/AppData/Local/FlashDevelop/Templates/AutoVersion/ActionScript 3.fdt * * @see http://www.flashdevelop.org/community/viewtopic.php?f=4&t=6423 - FlashDevelop forum thread * @see http://code.google.com/p/autoversion/ - Autoversion Google code page * * @author Damian Connolly */ public final class ITest { /** * The current version of the engine. This is auto-generated, so any changes will be overwritten */ static public const VERSION:String = "1.0.224.r1426"; } }
(BuildVersion becomes ITest and the package changes to the package I added the interface in) This will continue to do this until I close FlashDevelop and restart it. I'm using FD 3.2.2 RTM and the AutoVersion featured in AutoVersion 1.2.10174.2053.rar at the google code page. Have you come across this before?
|
| Thu Aug 12, 2010 12:34 pm |
|
 |
|
Neverbirth
Member
Joined: Mon Jul 06, 2009 8:14 am Posts: 71
|
 Re: AutoVersion
divillysausages wrote: Have you come across this before? Yes, I'm aware of it, a coworker came across it once, and I've seen it once as well, however, since I couldn't manage to reproduce it as often as I'd like I left the issue aside... I know where the problem comes from, but it's part of the FlashDevelop core code, and didn't find a solution that felt completely right, maybe I'm using a wrong method to replace those template variables, and there is a better one inside the FD API. I'll look into it again, but I don't know when I'm going to have some more spare time to spend on this.
|
| Tue Aug 31, 2010 1:02 pm |
|
 |
|
Neverbirth
Member
Joined: Mon Jul 06, 2009 8:14 am Posts: 71
|
 Re: AutoVersion
I cannot believe it's been more than 5 months since the last update... At last had the time (mostly because my team was suffering from it) to update the plugin: - Added the fixed AS 2 template that was uploaded back in July 8th. - Fixed a bug causing the plugin not to work correctly in some cases if spaces are used for indenting. - Fixed the problem that was causing FD to sometimes change $(FileNameWithPackage) and $(Package) with latest class or interface added to the project. - Compiled against latest released PluginCore and ProjectManager just in case. You can get AutoVersion 1.2.11047.1757 here.
|
| Wed Feb 16, 2011 5:15 pm |
|
 |
|
zszen
Member
Joined: Fri Mar 09, 2007 8:02 am Posts: 270
|
 Re: AutoVersion
ver.1.2.11047.1757 have some problem.
my autoversion plugin is at bottom of all plugins. and it is avoid. If I click to select it. it alert a board: "Setting Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
The type initializer for 'AutoVersion.GlobalIncrementSettings' threw an exception."
I use fd 3.3.4 rtm
|
| Fri Feb 18, 2011 7:56 am |
|
 |
|
Neverbirth
Member
Joined: Mon Jul 06, 2009 8:14 am Posts: 71
|
 Re: AutoVersion
Released a new version to fix a long standing bug that caused the plugin to throw an exception if it was disabled. http://code.google.com/p/autoversion/do ... 1.2112.fdz
|
| Sun Feb 20, 2011 9:37 pm |
|
 |
|
zszen
Member
Joined: Fri Mar 09, 2007 8:02 am Posts: 270
|
 Re: AutoVersion
|
| Mon Feb 21, 2011 2:44 am |
|
 |
|
zszen
Member
Joined: Fri Mar 09, 2007 8:02 am Posts: 270
|
 Re: AutoVersion
|
| Mon Feb 21, 2011 3:44 am |
|
 |
|
DjKermit
Member
Joined: Thu Aug 30, 2007 8:33 pm Posts: 7 Location: London
|
 Re: AutoVersion
Hi. Quite a nice job and everything seems to work fine except just two things. When working with AIR project the <version> tag in application.xml is appended each time rather then just content of it being replaced. So the file ends up looking like this: Code: ... <version xmlns="">1.1.123.0</version> <version xmlns="">1.1.124.0</version> <version xmlns="">1.1.125.0</version> </application>
Also it prints <version xmlns=""> where this xmlns attribute makes the file incompatible with AIR Application Properties.
|
| Mon Jul 11, 2011 8:44 pm |
|
 |
|
Neverbirth
Member
Joined: Mon Jul 06, 2009 8:14 am Posts: 71
|
 Re: AutoVersion
Thanks for the report. I guess both problems were introduced by the changes made to target .Net 2.0.
This week will release a new version with the problem solved and a version for FD4.
|
| Wed Jul 13, 2011 9:26 am |
|
 |
|
Neverbirth
Member
Joined: Mon Jul 06, 2009 8:14 am Posts: 71
|
 Re: AutoVersion
Neverbirth wrote: Thanks for the report. I guess both problems were introduced by the changes made to target .Net 2.0.
This week will release a new version with the problem solved and a version for FD4. I'm moving house, and aside from the time it takes, the telecom company has left me without phone and internet for 15-20 because of an error on their side, so sadly, the update will have to wait a bit...
|
| Mon Jul 18, 2011 11:37 am |
|
 |
|
Neverbirth
Member
Joined: Mon Jul 06, 2009 8:14 am Posts: 71
|
 Re: AutoVersion
Released a new version fixing the AIR versioning problem, and targetting FD 4.
Sorry for the delay, but moving took longer than expected, I had to repair several faults caused by my daughter in the old house before returning the keys to the owner if I wanted my deposit back heh.
|
| Sat Jul 30, 2011 12:54 am |
|
 |
|
JimmyDeemo
Member
Joined: Tue Sep 08, 2009 8:15 am Posts: 77
|
 Re: AutoVersion
Lord I can't believe I have only just found this plugin!?
Is there a way in which i can customise how the numbers are calculated based on which configuration I used to build the project? For example we have maj.minor.build.revision, can i get 'build' to increment when building in Debug configuration and 'minor' to increment when building in Release configuration?
Also, I have noticed that the increment takes place even when I call the .jsfl file to build my project. What is the plugin linked to as its 'trigger' so to speak? Is there anyway I can get your plugin to do its thing with a command line call? The reason being is I think I can coax it into including SVN revision information. I would need to:
1. Call your plugin on command line, to output a .txt file. 2. Call tortoiseSVN's SubWCRev with that file as the template. 3. Call the build script to build the project based on the output file.
Is this possible in the current guise? Could it be a feature added if not? I think regardless of how developers use your plugin, being able to customise when the increment happens during the build process would be beneficial.
|
| Wed Aug 03, 2011 2:02 pm |
|
 |
|
Neverbirth
Member
Joined: Mon Jul 06, 2009 8:14 am Posts: 71
|
 Re: AutoVersion
JimmyDeemo wrote: Lord I can't believe I have only just found this plugin!? There is also lamenace's plugin. JimmyDeemo wrote: Also, I have noticed that the increment takes place even when I call the .jsfl file to build my project. What is the plugin linked to as its 'trigger' so to speak? The versioning is triggered when FlashDevelop itself issues the events ProjectManager.ProjectManagerEvents.TestProject and ProjectManager.ProjectManagerEvents.BuildProject, or ProjectManager.ProjectManagerEvents.BuildComplete if you are using the increment after build option. JimmyDeemo wrote: Is there anyway I can get your plugin to do its thing with a command line call? The reason being is I think I can coax it into including SVN revision information. I would need to:
1. Call your plugin on command line, to output a .txt file. 2. Call tortoiseSVN's SubWCRev with that file as the template. 3. Call the build script to build the project based on the output file. Have you looked into the Happy Turtle plugin? It's on AutoVersion site. It already supports using SVN revision number for versioning projects. JimmyDeemo wrote: Is there a way in which i can customise how the numbers are calculated based on which configuration I used to build the project? For example we have maj.minor.build.revision, can i get 'build' to increment when building in Debug configuration and 'minor' to increment when building in Release configuration?
Is this possible in the current guise? Could it be a feature added if not? I think regardless of how developers use your plugin, being able to customise when the increment happens during the build process would be beneficial. Developers can make their own plugins for AutoVersion, just create a project, reference the AutoVersion assembly, and subclass the BaseIncrementor class. However, what you propose isn't or cannot be done because of the following things: - The incrementors don't know if you are in debug or release mode. I think your idea is nice, there are several ways of accomplishing it, the one I like more (because it would give more power to custom incrementors) would be to add a BuildAction CurrentBuildAction property to BaseIncrementor, however, it could break the codebase compatibility with BVI; the other "good" way of doing this would be modifying the VersioningStyle class, adding four new properties (BuildActionType MajorUpdateMode, BuildActionType MinorUpdateMode, etc) and check for those properties inside VersioningStyle.Increment.
The first method has also the downside that it would require one to make custom incrementors for just some trivial feature like this, although both changes could be added, of course.
- In order to correctly work, the plugin takes data from the FlashDevelop environment, so it makes launching the plugin from the commandline a bit hard. A separate console application could be made, and inject from it the needed data for the AutoVersion library, but I don't know right now the efforts it would need. FD offers some data like external paths, some coding formatting set up in settings, author name, etc.
I don't think this is something I'd add, at least in some long time. If Adobe would add a command line compiler for Flash Professional projects so they could be easily compiled from a CI server this would definitely be a feature of my interest, but not right now, sorry.
|
| Wed Aug 03, 2011 4:15 pm |
|
 |
|
JimmyDeemo
Member
Joined: Tue Sep 08, 2009 8:15 am Posts: 77
|
 Re: AutoVersion
Thanks, will see if I can bend that plugin to my will also. Neverbirth wrote: Have you looked into the Happy Turtle plugin? It's on AutoVersion site. It already supports using SVN revision number for versioning projects. I have, and unfortunately I need a little more control than just adding the revision number of the project. Ideally I need to be able to get the revision details for the main project, but also for each svn:external associated with it too. Hence my need for customising the build and needing to call SubWCRev. Neverbirth wrote: what you propose isn't or cannot be done Ahh sad bunny. Looks like I am going to have to go back to the drawing board for my build then. Will have to involve a script somewhere down the line me thinks. We have something that kind of works in Python right now, but what I was hoping for was to be able to replicate it with a combination of some kind of plugin, some JSFL and BAT files. This is off topic but in case you have an idea that might spark something off in my head. This is my dream of what I want to happen: Build in Debug: [*]Hit build. [*]Increment build number. [*]Gather information from repos, including externals. (I can make a template file that works with both your plugin and SubWCRev.) [*]Convert the last two steps into a .as file that is linked to the build. [*]Build the project. Build in Release: [*]Hit build. [*]Gather information from repos, including externals. [*]Exit if there are mixed or uncommitted revisions. (Figured this out already.) [*]Increment minor revision number, reset build number. [*]Build the project. (This is a check.) [*]Exit if there were compile errors. (Fail-safe.) [*]Commit version number info to repo, and update. (Currently done in Python script.) [*]Gather information from repos again, to ensure all up to date. [*]Convert version info, along with repo info to .as file that is linked to the build. [*]Build the project.
|
| Thu Aug 04, 2011 7:14 am |
|
|
Who is online |
Users browsing this forum: No registered users and 4 guests |
|
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
|
|
 |