versioning

Strategies for migrating serialized Json.NET document between versions/formats

﹥>﹥吖頭↗ 提交于 2019-12-18 08:50:03
问题 I'm using Json.Net to serialize some application data. Of course, the application specs have slightly changed and we need to refactor some of the business object data. What are some viable strategies to migrate previously serialized data to our new data format? For example, say we have orignally had a business object like: public class Owner { public string Name {get;set;} } public class LeaseInstrument { public ObservableCollection<Owner> OriginalLessees {get;set;} } We serialize an instance

Increment version in a text file

拟墨画扇 提交于 2019-12-18 07:40:42
问题 I have a text file that contains only one line with a version number of my application. An example would be 1.0.0.1. I would like to increment the build number. Using my example I would get the output 1.0.0.2 in the same text file. How can I do it with PowerShell? 回答1: This might be over kill, but it shows the use of the type [version] which will save the need to do string manipulation. $file = "C:\temp\File.txt" $fileVersion = [version](Get-Content $file | Select -First 1) $newVersion = "{0}

Best practice for a mysql data versioning system

青春壹個敷衍的年華 提交于 2019-12-18 03:38:38
问题 I have to store data like articles into a mysql database and if an article is modified, I have to save the old version as well to make it possible to restore it. I have found some similar questions and posts on this topic, but I am not sure, which solution is the best to solve the problem. Here is the basic table "articles" for better understanding: articles (id, name, text) For me, there are two different approaches for this: Approach 1 Store the data and every version of an article in the

Maintaining both free and pro versions of an application

坚强是说给别人听的谎言 提交于 2019-12-17 21:54:38
问题 I want to create a PRO version of my application for Android and was wondering how to structure my repository. For know I have a trunk and feature branches. I'd like to put a pro version in another branch but maybe there is a better way? For example, maybe I should create two branches - one for free version, the other for pro? Pro version will have additional features and will be ads-free, so eg. I don't want to include AdMob libraries in the pro version. Do you have any experience or

create version.txt file in project dir via build.gradle task

雨燕双飞 提交于 2019-12-17 18:47:57
问题 Apologies in advance for my ignorance. I'm very new to gradle. My is goal is to have some task in my build.gradle file, wherein a file 'version.txt' is created in my project directory whenever I run the gradle terminal command in my project root. This 'version.txt' file needs to contain version metadata of the build, such as: Version: 1.0 Revision: 1z7g30jFHYjl42L9fh0pqzmsQkF Buildtime: 2016-06-14 07:16:37 EST Application-name: foobarbaz app (^Revision would be the git commit hash of the HEAD

How to check in delphi the OS version? Windows 7 or Server 2008 R2?

一个人想着一个人 提交于 2019-12-17 16:44:42
问题 I always used to check the windows versions by their major/minor build numbers. Strangely enough, Windows 7 and Server 2008 R2, both return the same major/minor version number combination. Confirm this by typing ver into a command prompt 回答1: GetVersionEx. There is a chart of the version numbers and their associated editions here. Notice that the product type is different between 2008 R2 and Windows 7. 回答2: This works, and correctly detects many Windows Product Editions, including Windows XP,

Read AssemblyFileVersion from AssemblyInfo post-compile

若如初见. 提交于 2019-12-17 16:22:15
问题 How can one read the AssemblyFileVersion , or its components AssemblyFileMajorVersion , AssemblyFileMinorVersion , AssemblyFileBuildNumber , AssemblyFileRevision , within the .csproj, following compilation? I have tried the following which pulls the information from the built assembly: <Target Name="AfterCompile"> <GetAssemblyIdentity AssemblyFiles="$(TargetPath)"> <Output TaskParameter="Assemblies" ItemName="MyAssemblyIdentities"/> </GetAssemblyIdentity> <Message Text="AssemblyVersion = %

nuget spec dependencies, get latest version?

做~自己de王妃 提交于 2019-12-17 10:58:08
问题 In the nuspec versioning docs I see 1.0 = 1.0 ≤ x (,1.0] = x ≤ 1.0 (,1.0) = x < 1.0 [1.0] = x == 1.0 (1.0) = invalid (1.0,) = 1.0 < x (1.0,2.0) = 1.0 < x < 2.0 [1.0,2.0] = 1.0 ≤ x ≤ 2.0 empty = latest version. I have a packages.config that looks like this <packages> <package id="psake" version="4.2.0.1" /> </packages> and I would like to change the version to "latest". I've tried both <packages> <package id="psake" version="" /> </packages> and <packages> <package id="psake" /> </packages>

How to use JSF versioning for resources in jar

末鹿安然 提交于 2019-12-17 10:54:33
问题 PF 3.5.10, Mojarra 2.1.21, omnifaces 1.5 I have a JSF library (with css files only). This library is in a .jar file. The css will be included in xhtml with <h:outputStylesheet library="mylib" name="css/mycss.css"> . In html it is rendered to the following: localhost:8080/cms/javax.faces.resource/css/mycss.css.jsf?ln=mylib CSS file of primefaces is rendered to: localhost:8080/cms/javax.faces.resource/primefaces.js.jsf?ln=primefaces&v=3.5.10 Notice the library version (&3.5.10) at the end. How

How to derive application build version string with Git's `describe` command?

♀尐吖头ヾ 提交于 2019-12-17 10:32:14
问题 I want to compose application build version that is automatically derived from the Git branch name I am on (when building) and the number of commits since the branch has diverged. I believe this will be unique for any commit in my Git repository? Branch names are unique, and commits are linked to each other along a branch? If and when I tag a commit, I can also have the version be prefixed with that tag. In a way git describe does what I want, but it does not include the branch name I am on,