versioning

Is there a way to get version from package.json in nodejs code?

◇◆丶佛笑我妖孽 提交于 2019-12-27 12:09:34
问题 Is there a way to get the version set in package.json in a nodejs app? I would want something like this var port = process.env.PORT || 3000 app.listen port console.log "Express server listening on port %d in %s mode %s", app.address().port, app.settings.env, app.VERSION 回答1: I found that the following code fragment worked best for me. Since it uses require to load the package.json , it works regardless the current working directory. var pjson = require('./package.json'); console.log(pjson

Is it okay to merge individual files from one branch to another?

断了今生、忘了曾经 提交于 2019-12-25 05:33:12
问题 I have a three branch setup in TFS, DEV, PRE, and PROD. My team wants to merge individual files from DEV to PRE, so the code can enter test as they complete it. However, I've heard this is not a good idea, and that if we need to do that, we need to be using a feature branch setup. Does anyone have any recommendations on if we should or shouldn't be doing the merging at that fine level (and then when ready to move to production, we'd migrate the entire branch). 回答1: You would typically want to

Is it okay to merge individual files from one branch to another?

笑着哭i 提交于 2019-12-25 05:33:09
问题 I have a three branch setup in TFS, DEV, PRE, and PROD. My team wants to merge individual files from DEV to PRE, so the code can enter test as they complete it. However, I've heard this is not a good idea, and that if we need to do that, we need to be using a feature branch setup. Does anyone have any recommendations on if we should or shouldn't be doing the merging at that fine level (and then when ready to move to production, we'd migrate the entire branch). 回答1: You would typically want to

Deserialize to newer version [duplicate]

故事扮演 提交于 2019-12-25 02:07:37
问题 This question already has answers here : Deserialization backwards compatibility (5 answers) Closed 6 years ago . I have a binary file that was serialized from a class. That class has been updated. Now I need to deserialize the old file to the new class. I don't have access to the old code, but i have access to the old class. The Class was serialized using BinaryFormatter. Is there a way to do that? If not, maybe there a way to deserialize and save only the data that appears in both of the

Join two tables and apply group by, but change sort order

余生长醉 提交于 2019-12-25 01:33:28
问题 I have two tables, event and version. An event has many versions. I want to perform an inner join and get THE LAST version for each event. QUERY SELECT * FROM events.event e INNER JOIN events.version v ON (e.version_id = v.id) GROUP BY e.event_id TABLE EVENT id event_id version_id updated 1 1 7 03/08/2018 2 2 8 06/06/2018 3 2 9 02/07/2018 TABLE VERSION id name description comments 7 Dinner A fancy dinner Z Comment Z 8 Breakfast Fancy breakfast Y Comment Y 9 Breakfast Fancy breakfast X Comment

How to do the application versioning in the spring boot?

南楼画角 提交于 2019-12-24 06:34:13
问题 I am using spring boot and gradle for my application. The application can have different versions and we need to show this version info on the application in the footer. e.g. 1.0.0 or 1.0.0.RELEASE etc what are the possible ways to do this? 回答1: There is a good example in the documentation. You can automatically expand properties from the Gradle project and refer those properties as placeholders in your application.properties file. processResources { expand(project.properties) } You can then

TFS Online - start $(Rev.r) from 0

我的未来我决定 提交于 2019-12-24 05:47:11
问题 I am using $(Rev:.r) in my build number. Major.Minor$(Rev:.r) This works perfect and increments on every build and gets reset if the the major or minor version gets changed. But the numbering starts at 1 and not 0. So the first build is not 1.0.0 but 1.0.1 which is not really what I am going for. So is there a way to make the Revision start at 0? Thanks for the help... P.S. Unfortunately it is not possible to use Git and GitVersion in this project. 回答1: No, this can't be achieved. What is the

Assembly Version numbers, signed assemblies Why do I get a FileLoadExceptions

只愿长相守 提交于 2019-12-24 00:48:27
问题 My Problem: I have a signed assembly A.dll that it versioned as 1.0.0.0 I have another assembly (lets say B.dll) that references A.dll. Once both assemblies both assemblies load fine without any problem. Now if the version for A.dll changes to 1.0.0.1 and is recompiled Does B.dll have to be recompiled? I asking because I have this exact scenario where after A.dll had it's version changed I now receive the following Exception trying to load B.dll: Unhandled Exception: System.IO

iOS: How to upgrade my CFBundleVersion and my CFBundleShortVersionString automatically in Xcode 11? (My old script doesn't work anymore)

只愿长相守 提交于 2019-12-23 21:35:16
问题 I have a script that upgraded my version (0.01 by 0.01) and my build (1 by 1). It doesn't work anymore with the Xcode 11. Here is my script: #!/bin/bash rm -rf build Version=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$INFOPLIST_FILE") Version=$(echo "scale=2; $Version + 0.01" | bc) Build=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") Build=$($Build + 1) /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $Build" "$INFOPLIST_FILE" if [ "$

Versioning for different platforms with phonegap

只谈情不闲聊 提交于 2019-12-23 19:20:17
问题 We have encountered quite a few problems with our versioning when it came to our new project, where we work with phonegap 3.2. I wanted to ask you what's the best way to have the data versioned, with the following requirements: All developers have to change the www folder in the root directory in the project Some developers also need to change the Java Files in the platforms/android/src folder Some developers also need to change the Objective C code Should there be 3 different repository