versioning

Why does the Gemfile semantic versioning operator (~>) produce inconsistent results with one number?

百般思念 提交于 2019-12-01 18:01:11
The gemspec semantic versioning operator ~> (aka twiddle-wakka , aka pessimistic operator) allows a gem version to be constrained yet allow some upgrades. I have often seen that it can be read as: "~> 3.1" => "Any version 3.x, but at least 3.1" "~> 3.1.1" => "Any version 3.1.x, but at least 3.1.1" But with one number, this rule breaks down: "~> 3" => "Any version x, but at least 3" *NOT TRUE!* "~> 3" => "Any version 3.x" *True. But why?* If I wanted "Any version 3.x", I could just use "~> 3.0", which is consistent. As it stands, this change of operation at one number is inconsistent and

Reuse define statement from .h file in C# code

限于喜欢 提交于 2019-12-01 17:54:05
I have C++ project (VS2005) which includes header file with version number in #define directive. Now I need to include exactly the same number in twin C# project. What is the best way to do it? I'm thinking about including this file as a resource, then parse it at a runtime with regex to recover version number, but maybe there's a better way, what do you think? I cannot move version outside .h file, also build system depends on it and the C# project is one which should be adapted. You can achieve what you want in just a few steps: Create a MSBuild Task - http://msdn.microsoft.com/en-us/library

Reuse define statement from .h file in C# code

≯℡__Kan透↙ 提交于 2019-12-01 16:23:47
问题 I have C++ project (VS2005) which includes header file with version number in #define directive. Now I need to include exactly the same number in twin C# project. What is the best way to do it? I'm thinking about including this file as a resource, then parse it at a runtime with regex to recover version number, but maybe there's a better way, what do you think? I cannot move version outside .h file, also build system depends on it and the C# project is one which should be adapted. 回答1: You

C#: how to set version number of assembly

本秂侑毒 提交于 2019-12-01 15:01:58
I have written a DLL in C# using VS2005. Currently the DLL is showing a version number of 1.0.0.0. How do I set this version number to something different? You can either specify the file version using the AssemblyFileVersionAttribute directly... Instructs a compiler to use a specific version number for the Win32 file version resource. ...or you can remove this attribute entirely which will mean that the file version defaults to the assembly version. This is probably good practice as having a file version that is different to the assembly version will cause confusion. If the

Versioning when binary AND text files are involved?

二次信任 提交于 2019-12-01 11:15:22
I have a project where I need to maintain changes to both the text and binary files. I have a couple of options: Use patches Use a versioning system like git or hg. For my purposes, patches are a better option if it was only text files. However, since there are images that might be replaced/added/deleted, which is the best way to go? Is there a clean diff/patch utility that can take care of binary differences as well (without me having to specify it is binary -- I should be able to diff the entire directory and not individual files, which I can't with bash's diff in binary mode) and use them

Versioning when binary AND text files are involved?

对着背影说爱祢 提交于 2019-12-01 09:13:49
问题 I have a project where I need to maintain changes to both the text and binary files. I have a couple of options: Use patches Use a versioning system like git or hg. For my purposes, patches are a better option if it was only text files. However, since there are images that might be replaced/added/deleted, which is the best way to go? Is there a clean diff/patch utility that can take care of binary differences as well (without me having to specify it is binary -- I should be able to diff the

What changes can make serialized class versions incompatible?

感情迁移 提交于 2019-12-01 08:04:49
I'm experimenting with the java serialization API to create small persistent objects. In my research I have found a lot on the importance of versioning, so you can detect and handle incompatible changes between the stored object model and the current object model. What I can't seem to find is what changes to the object model can actually break compatibility. Does removing a primitive member variable break it? Does adding one? What changes to a Serializable class will cause the readObject/writeObject functions to break down without proper version difference handling? If you define

What changes can make serialized class versions incompatible?

ぃ、小莉子 提交于 2019-12-01 07:21:05
问题 I'm experimenting with the java serialization API to create small persistent objects. In my research I have found a lot on the importance of versioning, so you can detect and handle incompatible changes between the stored object model and the current object model. What I can't seem to find is what changes to the object model can actually break compatibility. Does removing a primitive member variable break it? Does adding one? What changes to a Serializable class will cause the readObject

NHibernate filter collection

蓝咒 提交于 2019-12-01 05:29:45
Using NHibernate I want to filter a collection in a class to contain ONLY a subset of possible objects. Below I am including a sample table data to help explain. I can find no way to do this using NHibernate. Table:DataObject DataObjectId(PK) / Name / CurrentVersion 11 "data.txt" 2 12 "info.txt" 3 Table:DataObjectVersion Id / Comment / VersionNumber / DataObjectId(FK) 31 "Genesis" 1 11 <= Ignore this object 32 "Changed data" 2 11 <= Get this object 34 "Genesis" 1 12 <= Ignore this object 35 "Changed info" 2 12 <= Ignore this object 36 "Added info" 3 12 <= Get this object I want to join on a

Generating version number in MSBuild

前提是你 提交于 2019-12-01 05:10:46
We have a C# solution with a WiX installer and an MSBuild build script. We're in the process of migrating from SVN to Git. As the fourth part of our version number, we want something that ascends with each build. Until now, we've used the SVN revision number for that. The MSBuild script defines a ProductVersion property, which included the SVN revision number as the final of the four numbers of the build version. However, we can't use that anymore, as we won't be using SVN anymore. I've been trying to find a replacement for the SVN revision number, but I can't figure out what to use. Jenkins