Skip to content

Commit

Permalink
Minor stuff: (Simple-Station#58)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
PJB3005 authored Apr 19, 2018
1 parent ed411fa commit 41bda76
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/libmonosgen-2.0.dylib
BuildFiles/Windows/Godot/*

# Working on the tools scripts is getting annoying okay?
.mypy_cache/
1 change: 1 addition & 0 deletions BuildChecker/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
INSTALLED_HOOKS_VERSION
DISABLE_SUBMODULE_AUTOUPDATE
12 changes: 10 additions & 2 deletions BuildChecker/git_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
from typing import List

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"


def run_command(command: List[str], capture: bool = False) -> subprocess.CompletedProcess:
"""
Runs a command with pretty output.
Expand Down Expand Up @@ -40,6 +42,9 @@ def update_submodules():
Updates all submodules.
"""

if os.path.isfile("DISABLE_SUBMODULE_AUTOUPDATE"):
return

# If the status doesn't match, force VS to reload the solution.
# status = run_command(["git", "submodule", "status"], capture=True)
run_command(["git", "submodule", "update", "--init", "--recursive"])
Expand All @@ -50,6 +55,7 @@ def update_submodules():
# print("Git submodules changed. Reloading solution.")
# reset_solution()


def install_hooks():
"""
Installs the necessary git hooks into .git/hooks.
Expand Down Expand Up @@ -77,7 +83,8 @@ def install_hooks():

for filename in os.listdir(str(hooks_source_dir)):
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():
Expand All @@ -91,6 +98,7 @@ def reset_solution():
with SOLUTION_PATH.open("w") as f:
f.write(content)


if __name__ == '__main__':
install_hooks()
update_submodules()
Empty file modified BuildChecker/hooks/post-checkout
100644 → 100755
Empty file.
Empty file modified BuildChecker/hooks/post-merge
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions Content.Client/Content.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProjectGuid>{A2E5F175-78AF-4DDD-8F97-E2D2552372ED}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
Expand Down Expand Up @@ -107,4 +107,4 @@
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
</Project>
</Project>
4 changes: 2 additions & 2 deletions Content.Server/Content.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProjectGuid>{B38DBBD0-04C2-4D1A-84E2-B3446F6ADF2A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
Expand Down Expand Up @@ -135,4 +135,4 @@
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
</Project>
</Project>
4 changes: 2 additions & 2 deletions Content.Shared/Content.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProjectGuid>{26AEEBB3-DDE7-443A-9F43-7BC7F4ACF6B5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
Expand Down Expand Up @@ -97,4 +97,4 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# space-station-14-content

This is the primary content repo for Space Station 14. To prevent people forking the engine, a "content" pack is loaded by the client and server. This content contains everything needed to play the game on one specific server.
This is the primary content repo for Space Station 14. To prevent people forking the engine, a "content" pack is loaded by the client and server. This content contains everything needed to play the game on one specific server.

0 comments on commit 41bda76

Please sign in to comment.