mirror of
https://github.com/ppy/osu.git
synced 2025-02-27 21:53:03 +08:00
Ensure that osu.Desktop.Deploy works
Closes https://github.com/ppy/osu/issues/1545.
This commit is contained in:
parent
d364603e45
commit
1456f98aff
29
osu.Desktop.Deploy/.vscode/launch.json
vendored
Normal file
29
osu.Desktop.Deploy/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [{
|
||||||
|
"name": "Deploy (Debug)",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "mono",
|
||||||
|
"program": "${workspaceRoot}/bin/Debug/net461/osu.Desktop.Deploy.exe",
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"preLaunchTask": "Build (Debug)",
|
||||||
|
"runtimeExecutable": null,
|
||||||
|
"env": {},
|
||||||
|
"console": "internalConsole"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Deploy (Release)",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "clr",
|
||||||
|
"program": "${workspaceRoot}/bin/Release/net461/osu.Desktop.Deploy.exe",
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"preLaunchTask": "Build (Release)",
|
||||||
|
"runtimeExecutable": null,
|
||||||
|
"env": {},
|
||||||
|
"console": "internalConsole"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
64
osu.Desktop.Deploy/.vscode/tasks.json
vendored
Normal file
64
osu.Desktop.Deploy/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||||
|
// for the documentation about the tasks.json format
|
||||||
|
"version": "2.0.0",
|
||||||
|
"command": "msbuild",
|
||||||
|
"type": "shell",
|
||||||
|
"suppressTaskName": true,
|
||||||
|
"args": [
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/property:DebugType=portable",
|
||||||
|
"/verbosity:minimal",
|
||||||
|
"/m" //parallel compiling support.
|
||||||
|
],
|
||||||
|
"tasks": [{
|
||||||
|
"taskName": "Build (Debug)",
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
},
|
||||||
|
"problemMatcher": [
|
||||||
|
"$msCompile"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskName": "Build (Release)",
|
||||||
|
"group": "build",
|
||||||
|
"args": [
|
||||||
|
"/property:Configuration=Release"
|
||||||
|
],
|
||||||
|
"problemMatcher": [
|
||||||
|
"$msCompile"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskName": "Clean (Debug)",
|
||||||
|
"args": [
|
||||||
|
"/target:Clean"
|
||||||
|
],
|
||||||
|
"problemMatcher": [
|
||||||
|
"$msCompile"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskName": "Clean (Release)",
|
||||||
|
"args": [
|
||||||
|
"/target:Clean",
|
||||||
|
"/property:Configuration=Release"
|
||||||
|
],
|
||||||
|
"problemMatcher": [
|
||||||
|
"$msCompile"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"taskName": "Clean All",
|
||||||
|
"dependsOn": [
|
||||||
|
"Clean (Debug)",
|
||||||
|
"Clean (Release)"
|
||||||
|
],
|
||||||
|
"problemMatcher": [
|
||||||
|
"$msCompile"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -96,7 +96,7 @@ namespace osu.Desktop.Deploy
|
|||||||
runCommand(nuget_path, "restore " + solutionPath);
|
runCommand(nuget_path, "restore " + solutionPath);
|
||||||
|
|
||||||
write("Updating AssemblyInfo...");
|
write("Updating AssemblyInfo...");
|
||||||
updateAssemblyInfo(version);
|
updateCsprojVersion(version);
|
||||||
|
|
||||||
write("Running build process...");
|
write("Running build process...");
|
||||||
foreach (string targetName in TargetNames.Split(','))
|
foreach (string targetName in TargetNames.Split(','))
|
||||||
@ -123,7 +123,7 @@ namespace osu.Desktop.Deploy
|
|||||||
uploadBuild(version);
|
uploadBuild(version);
|
||||||
|
|
||||||
//reset assemblyinfo.
|
//reset assemblyinfo.
|
||||||
updateAssemblyInfo("0.0.0");
|
updateCsprojVersion("0.0.0");
|
||||||
|
|
||||||
write("Done!", ConsoleColor.White);
|
write("Done!", ConsoleColor.White);
|
||||||
Console.ReadLine();
|
Console.ReadLine();
|
||||||
@ -297,7 +297,7 @@ namespace osu.Desktop.Deploy
|
|||||||
Directory.CreateDirectory(directory);
|
Directory.CreateDirectory(directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void updateAssemblyInfo(string version)
|
private static void updateCsprojVersion(string version)
|
||||||
{
|
{
|
||||||
var toUpdate = new[] { "<Version>", "<FileVersion>" };
|
var toUpdate = new[] { "<Version>", "<FileVersion>" };
|
||||||
string file = Path.Combine(ProjectName, $"{ProjectName}.csproj");
|
string file = Path.Combine(ProjectName, $"{ProjectName}.csproj");
|
||||||
@ -336,8 +336,8 @@ namespace osu.Desktop.Deploy
|
|||||||
path = Environment.CurrentDirectory;
|
path = Environment.CurrentDirectory;
|
||||||
|
|
||||||
while (!File.Exists(Path.Combine(path, $"{SolutionName}.sln")))
|
while (!File.Exists(Path.Combine(path, $"{SolutionName}.sln")))
|
||||||
path = path.Remove(path.LastIndexOf('\\'));
|
path = path.Remove(path.LastIndexOf(Path.DirectorySeparatorChar));
|
||||||
path += "\\";
|
path += Path.DirectorySeparatorChar;
|
||||||
|
|
||||||
Environment.CurrentDirectory = path;
|
Environment.CurrentDirectory = path;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user