Added batch scripts for adding, pulling and pushing an EL-GENERIC-IP subtree in project repositories
This commit is contained in:
parent
532264b9ad
commit
ff6e548bd9
3 changed files with 109 additions and 0 deletions
37
utilities/elgip_add.bat
Normal file
37
utilities/elgip_add.bat
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
@echo off
|
||||
REM =============================================================
|
||||
REM
|
||||
REM Copyright (c) 2020 Simon Southwell. All rights reserved.
|
||||
REM
|
||||
REM Date: 12th Sep 2020
|
||||
REM
|
||||
REM Script to add EL-GENERIC-IP as a subtree to a project
|
||||
REM repository.
|
||||
REM
|
||||
REM See https://confluence.gisapps.co.uk/display/EL/EL+Subtrees
|
||||
REM for more details
|
||||
REM
|
||||
REM =============================================================
|
||||
|
||||
REM check if in the correct directory (i.e. firmware exists)
|
||||
if not exist firmware (
|
||||
@echo No firmware directory found. Check you are in your repository's top level folder. Exiting
|
||||
@exit /b
|
||||
)
|
||||
|
||||
REM check if there is still a link to generic_ip
|
||||
if exist firmware\generic_ip (
|
||||
echo Found firmware\generic_ip. Please delete the folder or link before proceeding. Exiting
|
||||
exit /b
|
||||
)
|
||||
|
||||
REM check if there isn't a subtree already
|
||||
if exist firmware\el_generic_ip (
|
||||
echo Found firmware\el_generic_ip. Subtree already exists. If not, please remove folder before proceeding. Exiting
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Adding EL-GENERIC-IP subtree to firmware\el_generic_ip
|
||||
|
||||
git remote add EL-GENERIC-IP git@hydra:GIS_Embedded_Logic/EL-GENERIC-IP.git
|
||||
git subtree add --prefix=firmware/el_generic_ip EL-GENERIC-IP master
|
||||
36
utilities/elgip_pull.bat
Normal file
36
utilities/elgip_pull.bat
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
@echo off
|
||||
REM =============================================================
|
||||
REM
|
||||
REM Copyright (c) 2020 Simon Southwell. All rights reserved.
|
||||
REM
|
||||
REM Date: 12th Sep 2020
|
||||
REM
|
||||
REM Script to pull latest EL-GENERIC-IP files into local
|
||||
REM subtree of repository.
|
||||
REM
|
||||
REM See https://confluence.gisapps.co.uk/display/EL/EL+Subtrees
|
||||
REM for more details
|
||||
REM
|
||||
REM =============================================================
|
||||
|
||||
REM check if in the correct directory (i.e. firmware exists)
|
||||
if not exist firmware (
|
||||
@echo No firmware directory found. Check you are in your repository's top level folder. Exiting
|
||||
@exit /b
|
||||
)
|
||||
|
||||
REM check if there is still a link to generic_ip
|
||||
if exist firmware\generic_ip (
|
||||
echo Found firmware\generic_ip. Please check that the subtree has been added and remove the link before proceeding. Exiting
|
||||
exit /b
|
||||
)
|
||||
|
||||
REM check if there is a subtree folder
|
||||
if not exist firmware\el_generic_ip (
|
||||
echo Didn't find firmware\el_generic_ip. Subtree doesn't exist. Please run elgip_add.bat to add the subtree. Exiting
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Pulling latest subtree files from repository
|
||||
|
||||
git subtree pull --prefix=firmware/el_generic_ip EL-GENERIC-IP master
|
||||
36
utilities/elgip_push.bat
Normal file
36
utilities/elgip_push.bat
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
@echo off
|
||||
REM =============================================================
|
||||
REM
|
||||
REM Copyright (c) 2020 Simon Southwell. All rights reserved.
|
||||
REM
|
||||
REM Date: 12th Sep 2020
|
||||
REM
|
||||
REM Script to push latest subtree modified files to
|
||||
REM EL-GENERIC-IP repository.
|
||||
REM
|
||||
REM See https://confluence.gisapps.co.uk/display/EL/EL+Subtrees
|
||||
REM for more details
|
||||
REM
|
||||
REM =============================================================
|
||||
|
||||
REM check if in the correct directory (i.e. firmware exists)
|
||||
if not exist firmware (
|
||||
@echo No firmware directory found. Check you are in your repository's top level folder. Exiting
|
||||
@exit /b
|
||||
)
|
||||
|
||||
REM check if there is still a link to generic_ip
|
||||
if exist firmware\generic_ip (
|
||||
echo Found firmware\generic_ip. Please check that the subtree has been added and remove the link before proceeding. Exiting
|
||||
exit /b
|
||||
)
|
||||
|
||||
REM check if there is a subtree folder
|
||||
if not exist firmware\el_generic_ip (
|
||||
echo Didn't find firmware\el_generic_ip. Subtree doesn't exist. Please run elgip_add.bat to add the subtree. Exiting
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo Pushing modified subtree files to repository
|
||||
|
||||
git subtree push --prefix=firmware/el_generic_ip EL-GENERIC-IP master
|
||||
Loading…
Add table
Add a link
Reference in a new issue