Minor stuff: (#58)
* Minor stuff: * Making a file called DISABLE_SUBMODULE_AUTOUPDATE in BuildChecker/ makes it not always run git submodule update. * Added .mypy_cache to .gitignore. * Made default platforms x64 (from Any CPU). * Make git hooks +x.
This commit is contained in:
committed by
GitHub
parent
ed411fa944
commit
41bda76980
3
.gitignore
vendored
3
.gitignore
vendored
@@ -274,3 +274,6 @@ BuildFiles/Mac/Space Station 14.app/Contents/MacOS/GodotSharpTools.dll
|
|||||||
BuildFiles/Mac/Space Station 14.app/Contents/MacOS/mscorlib.dll
|
BuildFiles/Mac/Space Station 14.app/Contents/MacOS/mscorlib.dll
|
||||||
BuildFiles/Mac/Space Station 14.app/Contents/MacOS/libmonosgen-2.0.dylib
|
BuildFiles/Mac/Space Station 14.app/Contents/MacOS/libmonosgen-2.0.dylib
|
||||||
BuildFiles/Windows/Godot/*
|
BuildFiles/Windows/Godot/*
|
||||||
|
|
||||||
|
# Working on the tools scripts is getting annoying okay?
|
||||||
|
.mypy_cache/
|
||||||
|
|||||||
1
BuildChecker/.gitignore
vendored
1
BuildChecker/.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
INSTALLED_HOOKS_VERSION
|
INSTALLED_HOOKS_VERSION
|
||||||
|
DISABLE_SUBMODULE_AUTOUPDATE
|
||||||
|
|||||||
@@ -9,9 +9,11 @@ from pathlib import Path
|
|||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
SOLUTION_PATH = Path("..") / "SpaceStation14Content.sln"
|
SOLUTION_PATH = Path("..") / "SpaceStation14Content.sln"
|
||||||
CURRENT_HOOKS_VERSION = "1" # If this doesn't match the saved version we overwrite them all.
|
# If this doesn't match the saved version we overwrite them all.
|
||||||
|
CURRENT_HOOKS_VERSION = "2"
|
||||||
QUIET = len(sys.argv) == 2 and sys.argv[1] == "--quiet"
|
QUIET = len(sys.argv) == 2 and sys.argv[1] == "--quiet"
|
||||||
|
|
||||||
|
|
||||||
def run_command(command: List[str], capture: bool = False) -> subprocess.CompletedProcess:
|
def run_command(command: List[str], capture: bool = False) -> subprocess.CompletedProcess:
|
||||||
"""
|
"""
|
||||||
Runs a command with pretty output.
|
Runs a command with pretty output.
|
||||||
@@ -40,6 +42,9 @@ def update_submodules():
|
|||||||
Updates all submodules.
|
Updates all submodules.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if os.path.isfile("DISABLE_SUBMODULE_AUTOUPDATE"):
|
||||||
|
return
|
||||||
|
|
||||||
# If the status doesn't match, force VS to reload the solution.
|
# If the status doesn't match, force VS to reload the solution.
|
||||||
# status = run_command(["git", "submodule", "status"], capture=True)
|
# status = run_command(["git", "submodule", "status"], capture=True)
|
||||||
run_command(["git", "submodule", "update", "--init", "--recursive"])
|
run_command(["git", "submodule", "update", "--init", "--recursive"])
|
||||||
@@ -50,6 +55,7 @@ def update_submodules():
|
|||||||
# print("Git submodules changed. Reloading solution.")
|
# print("Git submodules changed. Reloading solution.")
|
||||||
# reset_solution()
|
# reset_solution()
|
||||||
|
|
||||||
|
|
||||||
def install_hooks():
|
def install_hooks():
|
||||||
"""
|
"""
|
||||||
Installs the necessary git hooks into .git/hooks.
|
Installs the necessary git hooks into .git/hooks.
|
||||||
@@ -77,7 +83,8 @@ def install_hooks():
|
|||||||
|
|
||||||
for filename in os.listdir(str(hooks_source_dir)):
|
for filename in os.listdir(str(hooks_source_dir)):
|
||||||
print("Copying hook {}".format(filename))
|
print("Copying hook {}".format(filename))
|
||||||
shutil.copyfile(str(hooks_source_dir/filename), str(hooks_target_dir/filename))
|
shutil.copyfile(str(hooks_source_dir/filename),
|
||||||
|
str(hooks_target_dir/filename))
|
||||||
|
|
||||||
|
|
||||||
def reset_solution():
|
def reset_solution():
|
||||||
@@ -91,6 +98,7 @@ def reset_solution():
|
|||||||
with SOLUTION_PATH.open("w") as f:
|
with SOLUTION_PATH.open("w") as f:
|
||||||
f.write(content)
|
f.write(content)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
install_hooks()
|
install_hooks()
|
||||||
update_submodules()
|
update_submodules()
|
||||||
|
|||||||
0
BuildChecker/hooks/post-checkout
Normal file → Executable file
0
BuildChecker/hooks/post-checkout
Normal file → Executable file
0
BuildChecker/hooks/post-merge
Normal file → Executable file
0
BuildChecker/hooks/post-merge
Normal file → Executable file
@@ -3,7 +3,7 @@
|
|||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
|
||||||
<ProjectGuid>{A2E5F175-78AF-4DDD-8F97-E2D2552372ED}</ProjectGuid>
|
<ProjectGuid>{A2E5F175-78AF-4DDD-8F97-E2D2552372ED}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
|
||||||
<ProjectGuid>{B38DBBD0-04C2-4D1A-84E2-B3446F6ADF2A}</ProjectGuid>
|
<ProjectGuid>{B38DBBD0-04C2-4D1A-84E2-B3446F6ADF2A}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
|
||||||
<ProjectGuid>{26AEEBB3-DDE7-443A-9F43-7BC7F4ACF6B5}</ProjectGuid>
|
<ProjectGuid>{26AEEBB3-DDE7-443A-9F43-7BC7F4ACF6B5}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
|||||||
Reference in New Issue
Block a user