lab-dexter / smart-recycling-bins

Other
1 stars 0 forks source link

Added upstream branch diff check #2

Closed asmontas-i closed 6 years ago

asmontas-i commented 6 years ago

Example log output when new commits in the upstream branch are detected:

pi@raspberrypi:~ $ sudo ./smart-recycling-bins-app/app-sync.sh deployment
=============================================================================
2018-02-17 18:03:20 : Started deployment of smart-recycling-bins software
=============================================================================

 Target branch is: deployment
-----------------------------------------------------------------------------
Current branch does NOT MATCH upstream branch commit. Pulling...
Updating 1c7052b..fe0ed49
Fast-forward
 README.md | 1 -
 1 file changed, 1 deletion(-)
-----------------------------------------------------------------------------
 Deploying dependency packages, etc.
-----------------------------------------------------------------------------
Checking if python-setuptools is installed...
...python-setuptools is INSTALLED
Checking if python-pip is installed...
...python-pip is INSTALLED
15.1.0
Virtual python environment found.
Requirement already satisfied: cayenne-mqtt==1.0.1 in ./smart-recycling-bins-app/srb/lib/python2.7/site-packages (from -r /home/pi/smart-recycling-bins-app/smart-recycling-bins/config/requirements.txt (line 1))
Requirement already satisfied: paho-mqtt==1.3.1 in ./smart-recycling-bins-app/srb/lib/python2.7/site-packages (from -r /home/pi/smart-recycling-bins-app/smart-recycling-bins/config/requirements.txt (line 2))
Requirement already satisfied: RPi.GPIO==0.6.3 in ./smart-recycling-bins-app/srb/lib/python2.7/site-packages (from -r /home/pi/smart-recycling-bins-app/smart-recycling-bins/config/requirements.txt (line 3))
-----------------------------------------------------------------------------
 Setting up service related files
-----------------------------------------------------------------------------
Copied over new service file
Copied over new app-sync.sh
2018-02-17 18:03:31 : Finished deploying/updating smart-recycling-bins-app

Example log output when local head matches the upstream branch:

pi@raspberrypi:~ $ sudo ./smart-recycling-bins-app/app-sync.sh deployment
=============================================================================
2018-02-17 18:30:01 : Started deployment of smart-recycling-bins software
=============================================================================

 Target branch is: deployment
-----------------------------------------------------------------------------
Current branch MATCHES upstream branch. Exiting...
2018-02-17 18:30:04 : Finished deploying/updating smart-recycling-bins-app