From ec58aacc694a2b252e5903025789b079fac4378b Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Sun, 9 Feb 2020 22:32:58 +0100 Subject: [PATCH] Merge .gitignore files + add hook to update server --- .gitignore | 27 +++++++++++++++++++++++++++ client/.gitignore | 25 ------------------------- hooks/post-update.dist | 2 ++ server/.gitignore | 42 ------------------------------------------ 4 files changed, 29 insertions(+), 67 deletions(-) create mode 100644 .gitignore delete mode 100644 client/.gitignore create mode 100755 hooks/post-update.dist delete mode 100644 server/.gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..0fafd876 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# Various files +/hooks/post-update +/server/db/vchess.sqlite +/server/config/parameters.js +/client/dist/ +/client/src/parameters.js + +# Dependency directories# +node_modules/ + +# Log files +npm-debug.log* + +# Temp files +*.swp +*~ + +# Optional npm cache directory +.npm/ + +# Optional eslint cache +.eslintcache/ + +# dotenv environment variables file +.env +.env.local +.env.*.local diff --git a/client/.gitignore b/client/.gitignore deleted file mode 100644 index 92c9a5f4..00000000 --- a/client/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -.DS_Store -node_modules -/dist -/src/parameters.js - -# local env files -.env.local -.env.*.local - -# Log files -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Editor directories and files -.idea -.vscode -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw* - -# next.js build output -.next diff --git a/hooks/post-update.dist b/hooks/post-update.dist new file mode 100755 index 00000000..41590ea2 --- /dev/null +++ b/hooks/post-update.dist @@ -0,0 +1,2 @@ +#!/bin/sh +ssh user@server -t 'cd /path/to/vchess/client && git pull && npm run build' diff --git a/server/.gitignore b/server/.gitignore deleted file mode 100644 index aeb7c87d..00000000 --- a/server/.gitignore +++ /dev/null @@ -1,42 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Temp files -*.swp -*~ - -# Various files -/db/vchess.sqlite -/config/parameters.js -/static/ - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -- 2.44.0