Improve the setup and update scripts
This commit is contained in:
parent
b1c576fa56
commit
541ba8fce5
@ -32,14 +32,14 @@ IF ERRORLEVEL 1 (
|
||||
GOTO :end
|
||||
)
|
||||
|
||||
where /q npm
|
||||
where /q pnpm
|
||||
IF ERRORLEVEL 1 (
|
||||
ECHO 'Error: npm is not installed.' >&2
|
||||
ECHO Please install npm from: https://nodejs.org/en/download/
|
||||
ECHO 'Error: pnpm is not installed.' >&2
|
||||
ECHO Please install npm from: https://pnpm.io
|
||||
ECHO And make sure its in the path
|
||||
GOTO :end
|
||||
)
|
||||
echo Dependencies are already Installed
|
||||
echo Dependencies are already installed
|
||||
ECHO.
|
||||
echo Creating organization directory
|
||||
ECHO.
|
||||
@ -66,28 +66,6 @@ git clone https://github.com/fosscord/react-native-withcss react-native-withcss
|
||||
|
||||
echo {"folders":[{"path":"overview"},{"path":"cdn"},{"path":"api"},{"path":"gateway"},{"path":"media"},{"path":"server-util"},{"path":"ui"},{"path":"client"},{"path":"plugins"},{"path":"themes"},{"path":"landingpage"},{"path":"dashboard"},{"path":"support"},{"path":"css-mediaquery"},{"path":"react-native-withcss"}]}> fosscord.code-workspace
|
||||
|
||||
where /q code
|
||||
IF ERRORLEVEL 0 (
|
||||
|
||||
ECHO Opening VSCode Workspace
|
||||
code fosscord.code-workspace
|
||||
)
|
||||
|
||||
|
||||
CHOICE /c yn /m "Do you want to install the Discord Rich Presence?"
|
||||
IF %ERRORLEVEL% == 2 GOTO :end
|
||||
cd ..
|
||||
cd rpc
|
||||
|
||||
|
||||
npm install
|
||||
|
||||
npm i pm2 -g
|
||||
pm2 start --name rpc index.js
|
||||
pm2 save
|
||||
pm2-startup install
|
||||
:end
|
||||
|
||||
ECHO finished installation
|
||||
@ECHO on
|
||||
PAUSE
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
cat << EOF
|
||||
--------------------------------------
|
||||
Discord Open Source Contribution Setup
|
||||
Fosscord Open Source Contribution Setup
|
||||
strg+c/strg+d to exit
|
||||
-------------------------------------------
|
||||
This will clone and setup all repositories,
|
||||
@ -29,13 +29,13 @@ if ! [ -x "$(command -v node)" ]; then
|
||||
echo And make sure its in the path
|
||||
exit 1
|
||||
fi
|
||||
if ! [ -x "$(command -v npm)" ]; then
|
||||
if ! [ -x "$(command -v pnpm)" ]; then
|
||||
echo 'Error: npm is not installed.' >&2
|
||||
echo Please install npm from: https://nodejs.org/en/download/
|
||||
echo Please install npm from: https://pnpm.io
|
||||
echo And make sure its in the path
|
||||
exit 1
|
||||
fi
|
||||
echo ✓ Dependencies are already Installed
|
||||
echo ✓ Dependencies are already installed
|
||||
echo -------------------------------
|
||||
echo Creating organization directory
|
||||
mkdir fosscord
|
||||
@ -60,8 +60,3 @@ git clone https://github.com/fosscord/css-mediaquery css-mediaquery
|
||||
git clone https://github.com/fosscord/react-native-withcss react-native-withcss
|
||||
|
||||
echo '{"folders":[{"path":"overview"},{"path":"cdn"},{"path":"api"},{"path":"gateway"},{"path":"media"},{"path":"server-util"},{"path":"ui"},{"path":"client"},{"path":"plugins"},{"path":"themes"},{"path":"landingpage"},{"path":"dashboard"},{"path":"support"},{"path":"css-mediaquery"},{"path":"react-native-withcss"}]}' >> fosscord.code-workspace
|
||||
|
||||
if [ -x "$(command -v code)" ]; then
|
||||
echo Open VSCode Workspace
|
||||
code fosscord.code-workspace
|
||||
fi
|
||||
|
3
scripts/update/update-git.bat
Normal file
3
scripts/update/update-git.bat
Normal file
@ -0,0 +1,3 @@
|
||||
@ECHO off
|
||||
ECHO Update for Git...
|
||||
FOR /D %%a IN (%CD%\fosscord\*) do echo -------------- && echo %%~fa && git -C %%~fa pull
|
3
scripts/update/update.sh → scripts/update/update-git.sh
Executable file → Normal file
3
scripts/update/update.sh → scripts/update/update-git.sh
Executable file → Normal file
@ -1,11 +1,10 @@
|
||||
echo Update all repositories ...
|
||||
echo Update for Git...
|
||||
cd ../../../
|
||||
for D in */; do
|
||||
echo --------------
|
||||
echo "$D";
|
||||
cd $D
|
||||
git pull
|
||||
npm i
|
||||
cd ..
|
||||
done
|
||||
echo Done
|
3
scripts/update/update-pnpm.bat
Normal file
3
scripts/update/update-pnpm.bat
Normal file
@ -0,0 +1,3 @@
|
||||
@ECHO off
|
||||
ECHO Update for PNPM...
|
||||
FOR /D %%a IN (%CD%\fosscord\*) do echo -------------- && echo %%~fa && cd %%~fa && pnpm i
|
10
scripts/update/update-pnpm.sh
Normal file
10
scripts/update/update-pnpm.sh
Normal file
@ -0,0 +1,10 @@
|
||||
echo Update for Git...
|
||||
cd ../../../
|
||||
for D in */; do
|
||||
echo --------------
|
||||
echo "$D";
|
||||
cd $D
|
||||
pnpm i
|
||||
cd ..
|
||||
done
|
||||
echo Done
|
@ -1,5 +0,0 @@
|
||||
@ECHO off
|
||||
ECHO Update...
|
||||
cd ..\..\..\
|
||||
FOR /D %%a IN (%CD%\fosscord-workspace\*) do git -C %%~fa pull && npm i
|
||||
PAUSE
|
Loading…
x
Reference in New Issue
Block a user