I use MSBuild to automate the process of exporting sources from SVN repo, building & zipping everything altogether. So everything boils down to running PrepareDownloads Release twice - because of how MSBuild operates.
The build process should be automated so that you can do all those with one command on the command line.
If I want to put together the current development version (assuming that there is no continuous integration system already doing that), I say mvn clean package which will automatically download all library dependencies on need, build the software, run all tests and assemble the relase artifacts in a tidy ZIP file. It might take a couple of hours to configure the automated build process using Maven (more if Maven is new to you, less if you can copy a config template from one of your other projects), but after that it's just one command on the command line.
When releasing a new version, I run mvn release:prepare to increment the version number and to tag the release in the source control, after which I export the new tag from source control and build it with mvn clean deploy which will assemble the artifacts and upload them to a web accessible repository.
发布评论
评论(5)
为了执行 1 - 3,我只需从 Subversion 进行导出。
To do 1 - 3, I just do an export from Subversion.
使用 TortoiseSVN 的导出命令将从源树中删除所有 _svn/.svn 文件夹。 我不知道这是否有帮助。
Using TortoiseSVN's export command will remove all the _svn/.svn folders from your source tree. I don't know if that helps at all.
我们在 Tortoise SVN 中有一个排除策略,可以从一开始就阻止那些垃圾进入那里。
Bin bin Obj obj ~* *.bak *.tmp *.suo *.user PrecompiledWeb
Well we have an Exclude policy in Tortoise SVN to stop that junk getting in there in the first place.
Bin bin Obj obj ~* *.bak *.tmp *.suo *.user PrecompiledWeb
我使用 MSBuild 来自动化 从 SVN repo 导出源、构建&的过程 把所有东西都压缩起来。 因此,一切都归结为运行
PrepareDownloads Release
两次 - 因为 MSBuild 的运作方式。I use MSBuild to automate the process of exporting sources from SVN repo, building & zipping everything altogether. So everything boils down to running
PrepareDownloads Release
twice - because of how MSBuild operates.构建过程应该是自动化的,以便您可以在命令行上使用一个命令来完成所有这些操作。
如果我想将当前的开发版本放在一起(假设没有持续集成系统已经这样做),我会说
mvn clean package
它将根据需要自动下载所有库依赖项,构建软件,运行所有测试并将发布工件组装到一个整洁的 ZIP 文件中。 使用 Maven 配置自动构建过程可能需要几个小时(如果 Maven 对您来说是新的,则需要花费更多时间,如果您可以从其他项目之一复制配置模板,则花费更少),但之后它只是命令中的一个命令线。发布新版本时,我运行
mvn release:prepare
来增加版本号并在源代码管理中标记版本,然后从源代码管理中导出新标签并使用mvn clean deploy
它将组装工件并将它们上传到可通过网络访问的存储库。The build process should be automated so that you can do all those with one command on the command line.
If I want to put together the current development version (assuming that there is no continuous integration system already doing that), I say
mvn clean package
which will automatically download all library dependencies on need, build the software, run all tests and assemble the relase artifacts in a tidy ZIP file. It might take a couple of hours to configure the automated build process using Maven (more if Maven is new to you, less if you can copy a config template from one of your other projects), but after that it's just one command on the command line.When releasing a new version, I run
mvn release:prepare
to increment the version number and to tag the release in the source control, after which I export the new tag from source control and build it withmvn clean deploy
which will assemble the artifacts and upload them to a web accessible repository.