This repository has been archived by the owner on Jan 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
107 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,5 @@ packages/ | |
*.sln.* | ||
gh-pages/ | ||
ConfuserEx.snk | ||
GlobalAssemblyInfo.cs | ||
/Build/*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@echo off | ||
%windir%\microsoft.net\framework\v4.0.30319\msbuild ..\Confuser2.sln /p:Configuration=Release "/p:Platform=Any CPU" | ||
@IF %ERRORLEVEL% NEQ 0 GOTO err | ||
7z a ConfuserEx_bin.zip -tzip @files.lst | ||
@exit /B 0 | ||
:err | ||
@PAUSE | ||
@exit /B 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using System; | ||
using System.Diagnostics; | ||
using System.IO; | ||
|
||
public static class Program { | ||
public static int Main(string[] args) { | ||
if (args.Length != 1) { | ||
Console.WriteLine("invalid argument length."); | ||
return -1; | ||
} | ||
|
||
string dir = args[0]; | ||
string ver = File.ReadAllText(Path.Combine(dir, "VERSION")); | ||
string tag = null; | ||
|
||
string gitDir = Path.Combine(dir, ".git"); | ||
if (!Directory.Exists(gitDir)) { | ||
Console.WriteLine("git repository not found."); | ||
} | ||
else { | ||
try { | ||
var info = new ProcessStartInfo("git", "describe"); | ||
info.RedirectStandardOutput = true; | ||
info.UseShellExecute = false; | ||
using (Process ps = Process.Start(info)) { | ||
tag = ps.StandardOutput.ReadLine(); | ||
string[] infos = tag.Split('-'); | ||
if (infos.Length >= 3) | ||
ver = ver + "." + infos[infos.Length - 2]; | ||
else | ||
ver = ver + ".0"; | ||
ps.WaitForExit(); | ||
if (ps.ExitCode != 0) { | ||
Console.WriteLine("error when executing git describe: " + ps.ExitCode); | ||
} | ||
} | ||
} | ||
catch { | ||
Console.WriteLine("error when executing git describe."); | ||
} | ||
} | ||
tag = tag ?? "v" + ver; | ||
|
||
string template = Path.Combine(dir, "GlobalAssemblyInfo.Template.cs"); | ||
string output = Path.Combine(dir, "GlobalAssemblyInfo.cs"); | ||
|
||
string verInfo = File.ReadAllText(template); | ||
verInfo = verInfo.Replace("{{VER}}", ver); | ||
verInfo = verInfo.Replace("{{TAG}}", tag); | ||
File.WriteAllText(output, verInfo); | ||
Console.WriteLine("Version updated."); | ||
return 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{1e74b523-aa86-42a0-8116-fff7cebfcba7}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<RootNamespace>UpdateVersion</RootNamespace> | ||
<AssemblyName>UpdateVersion</AssemblyName> | ||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
<DebugSymbols>false</DebugSymbols> | ||
<DebugType>None</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>.\</OutputPath> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="UpdateVersion.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
..\Release\bin\Confuser.CLI.exe | ||
..\Release\bin\Confuser.CLI.pdb | ||
..\Release\bin\Confuser.Core.* | ||
..\Release\bin\Confuser.DynCipher.* | ||
..\Release\bin\Confuser.Protections.* | ||
..\Release\bin\Confuser.Renamer.* | ||
..\Release\bin\Confuser.Runtime.* | ||
..\Release\bin\dnlib.* | ||
..\Release\bin\System.Threading.dll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.1.0 |