Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Automate builds, auto compile & packaging

views
     
TSAnime4000
post Nov 15 2015, 09:33 PM, updated 9y ago

Regular
******
Senior Member
1,917 posts

Joined: Jul 2009
From: /dev/null


I trying to make automate builds, it will compile and package when detect new commit or changes

CODE
#!/bin/sh
while true
do
   if [[ -z $(git fetch origin) ]]; then
       echo "No changes detected"
       sleep 30
   else
       echo "New changes detected, building..."
       sh configure
       make
   fi
done


result:
CODE
No changes detected                                                                                                                                                                                                                    
remote: Counting objects: 3, done.                                                                                                                                                                                                    
remote: Compressing objects: 100% (3/3), done.                                                                                                                                                                                        
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0                                                                                                                                                                          
Unpacking objects: 100% (3/3), done.                                                                                                                                                                                                  
From https://github.com/Anime4000/IFME                                                                                                                                                                                                
  59e7cc7..f7f05b1  master     -> origin/master                                                                                                                                                                                      
No changes detected

anangryorc
post Nov 16 2015, 03:01 AM

On my way
****
Senior Member
597 posts

Joined: May 2006


Consider using CI, eg https://jenkins-ci.org

Btw, Using git hook is better than polling. Use the hook to call jenkins api to start build, deploy

 

Change to:
| Lo-Fi Version
0.0121sec    0.11    5 queries    GZIP Disabled
Time is now: 29th March 2024 - 03:33 AM