first commit
This commit is contained in:
24
Windows/MERGE-TO-PRODUCTION.bat
Normal file
24
Windows/MERGE-TO-PRODUCTION.bat
Normal file
@@ -0,0 +1,24 @@
|
||||
@echo off
|
||||
|
||||
:: Prompt for confirmation
|
||||
set /p confirmation="Are you sure you want to merge 'development' into 'production'? (y/n): "
|
||||
|
||||
if /i "%confirmation%"=="y" (
|
||||
:: Switch to the production branch
|
||||
git checkout production
|
||||
|
||||
:: Pull the latest changes for production
|
||||
git pull origin production
|
||||
|
||||
:: Merge the development branch into production
|
||||
git merge development
|
||||
|
||||
:: Check if the merge was successful
|
||||
if %errorlevel%==0 (
|
||||
echo Merge successful. Please resolve any conflicts and commit.
|
||||
) else (
|
||||
echo Merge failed. Please resolve conflicts manually.
|
||||
)
|
||||
) else (
|
||||
echo Merge aborted.
|
||||
)
|
||||
58
Windows/PUSH-TO-DEVELOPMENT.bat
Normal file
58
Windows/PUSH-TO-DEVELOPMENT.bat
Normal file
@@ -0,0 +1,58 @@
|
||||
@echo off
|
||||
setlocal ENABLEDELAYEDEXPANSION
|
||||
|
||||
:: Ensure we're inside a Git repository
|
||||
git rev-parse --git-dir > NUL 2>&1
|
||||
if ERRORLEVEL 1 (
|
||||
echo Error: This directory is not a Git repository.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Get the current branch name
|
||||
FOR /F "delims=" %%i IN ('git symbolic-ref --short HEAD') DO SET CURRENT_BRANCH=%%i
|
||||
|
||||
:: Check if the current branch is 'development'
|
||||
if NOT "!CURRENT_BRANCH!"=="development" (
|
||||
echo Error: You are not on the 'development' branch.
|
||||
echo Please switch to the 'development' branch and run this script again.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Prompt for a commit message
|
||||
set /p COMMIT_MESSAGE=Enter your commit message:
|
||||
|
||||
if "%COMMIT_MESSAGE%"=="" (
|
||||
echo Error: Commit message cannot be empty.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Add all changes
|
||||
git add --all
|
||||
|
||||
:: Show the changes to be committed
|
||||
echo The following changes will be committed:
|
||||
git status --short
|
||||
|
||||
:: Prompt for confirmation to commit
|
||||
set /p CONFIRMATION=Do you want to proceed with the commit and push to 'development' branch? (yes/no):
|
||||
|
||||
if /I NOT "%CONFIRMATION%"=="yes" (
|
||||
echo Aborting commit and push to 'development' branch.
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
:: Commit the changes with the provided message
|
||||
git commit -m "%COMMIT_MESSAGE%"
|
||||
|
||||
:: Show the last commit
|
||||
echo Last commit on 'development' branch:
|
||||
git --no-pager log -1 --pretty=format:"%%h - %%s (%%an, %%ar)"
|
||||
echo.
|
||||
|
||||
:: Pull the latest changes from the remote 'development' branch
|
||||
git pull origin development --rebase
|
||||
|
||||
:: Push the 'development' branch to the remote repository
|
||||
git push origin development
|
||||
|
||||
echo Successfully pushed changes to 'development' branch.
|
||||
66
Windows/PUSH-TO-PRODUCTION.bat
Normal file
66
Windows/PUSH-TO-PRODUCTION.bat
Normal file
@@ -0,0 +1,66 @@
|
||||
@echo off
|
||||
setlocal ENABLEDELAYEDEXPANSION
|
||||
|
||||
:: Ensure we're inside a Git repository
|
||||
git rev-parse --git-dir > NUL 2>&1
|
||||
if ERRORLEVEL 1 (
|
||||
echo Error: This directory is not a Git repository.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Get the current branch name
|
||||
FOR /F "delims=" %%i IN ('git symbolic-ref --short HEAD') DO SET CURRENT_BRANCH=%%i
|
||||
|
||||
:: Check if the current branch is 'development'
|
||||
if NOT "!CURRENT_BRANCH!"=="development" (
|
||||
echo Error: You are not on the 'development' branch.
|
||||
echo Please switch to the 'development' branch and run this script again.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Prompt for a commit message
|
||||
set /p COMMIT_MESSAGE=Enter your commit message:
|
||||
|
||||
if "%COMMIT_MESSAGE%"=="" (
|
||||
echo Error: Commit message cannot be empty.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Add all changes
|
||||
git add --all
|
||||
|
||||
:: Commit the changes with the provided message
|
||||
git commit -m "%COMMIT_MESSAGE%"
|
||||
|
||||
:: Show the last commit
|
||||
echo Last commit on 'development' branch:
|
||||
git --no-pager log -1 --pretty=format:"%%h - %%s (%%an, %%ar)"
|
||||
echo.
|
||||
|
||||
:: Prompt for confirmation to push to 'production'
|
||||
set /p CONFIRMATION=Do you want to merge 'development' into 'production' and push to the remote repository? (yes/no):
|
||||
|
||||
if /I NOT "%CONFIRMATION%"=="yes" (
|
||||
echo Aborting push to 'production' branch.
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
:: Fetch the latest changes from the remote repository
|
||||
git fetch origin
|
||||
|
||||
:: Switch to the 'production' branch
|
||||
git checkout production
|
||||
|
||||
:: Pull the latest changes in 'production' branch
|
||||
git pull origin production
|
||||
|
||||
:: Merge 'development' into 'production'
|
||||
git merge --no-ff development -m "Merge branch 'development' into 'production'"
|
||||
|
||||
:: Push the 'production' branch to the remote repository
|
||||
git push origin production
|
||||
|
||||
:: Switch back to the 'development' branch
|
||||
git checkout development
|
||||
|
||||
echo Successfully pushed changes from 'development' to 'production' branch.
|
||||
14
Windows/start-all-servers.bat
Normal file
14
Windows/start-all-servers.bat
Normal file
@@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
echo Starting all servers...
|
||||
|
||||
REM Open the Velocity proxy in a new Git Bash window
|
||||
start "" "C:\Program Files\Git\bin\bash.exe" -c "C:/Users/pomam/Documents/Feyhallow/Development Environment/Development Servers/Proxy/startup-proxy-dev.sh"
|
||||
|
||||
REM Open the first Minecraft server in a new Git Bash window
|
||||
start "" "C:\Program Files\Git\bin\bash.exe" -c "C:/Users/pomam/Documents/Feyhallow/Development Environment/Development Servers/Lobby/startup-server-dev.sh"
|
||||
|
||||
REM Open the second Minecraft server in a new Git Bash window
|
||||
start "" "C:\Program Files\Git\bin\bash.exe" -c "C:/Users/pomam/Documents/Feyhallow/Development Environment/Development Servers/Survie/startup-server-dev.sh"
|
||||
|
||||
echo All servers are starting in separate windows!
|
||||
pause
|
||||
Reference in New Issue
Block a user