三個js檔案叫increment.js,version.h,build.h
****************************************==**如下
main();
function main()
{var bdebug = false
var args = wscript.arguments;
if(args.length > 0 && args(0) == "/debug")
bdebug = true;
// create shell object
var wsshell = wscript.createobject("wscript.shell");
// create file system object
var filesys = wscript.createobject("scripting.filesystemobject");
var strvalue = filesys.getabsolutepathname("");
if(strvalue == null || strvalue == "")
strvalue = ".";
var strsourcefolder = filesys.buildpath(strvalue, "build.h");
if(bdebug)
wscript.echo("source: " + strsourcefolder);
var strtextstream = filesys.opentextfile(strsourcefolder, 1, false);
var x;
strtextstream.skipline();
var str = strtextstream.readline()
x = parseint(str) + 1;
if(bdebug)
wscript.echo(x);
strtextstream.close();
strtextstream = filesys.opentextfile(strsourcefolder, 2, false);
strtextstream.writeline("#define build ///r/n" + x);
strtextstream.close();
version.h
#pragma once
#include "build.h"
#define build build
#define str_(i) #i
#define str(i) str_(i)
#define filever 1,1,0,0
#define productver 1,1,1, build
#define strfilever "1, 1, 0, 0/0"
#define strproductver "1, 1, 0, " str(build) "/0"
build.h
#define build /
1
自動增加svn庫版本號
hello.cpp include include svn version.h using namespace std int main makefile.am automake options foreign bin programs hello hello sources hello.cpp h...
VS2017程式集版本號自動增加
一 修改程式集檔案assemblyinfo.cs,將 assembly assemblyversion 1.0.0.0 修改為 assembly assemblyversion 1.0.修改後報如下錯誤 將文字表示為utf 16 單元的序列。要瀏覽此型別的.net framework源 請參閱參考源...
python 自動生成版本號
本文適用於使用subversion版本控制的讀者.前一段時間研究了一下tortoisesvn的源 發現它使用 nant subwcrev.exe 來自動生成版本號的.subwcrev.exe 是tortoisesvn下的乙個命令列工具,安裝了tortoisesvn 就找到它.這裡補充一下tortoi...