File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 3737 throw new Exception('Server URL is not defined for environment '. $environment .'.');
3838 } elseif ( ! $repoUrl) {
3939 throw new Exception('Repository URL is not defined for environment '. $environment .'.');
40- } elseif ( ! $commitHash) {
41- throw new Exception('No commit hash/tag was provided. Please provide one using --commit.');
4240 }
4341
4442 // Define paths
5250 $releasePath = $releasesPath .'/'. (isset($release) ? $release : date('YmdHis'));
5351@endsetup
5452
55- @servers ([' web' => ' -A ' . $sshOptions . ' "' . $server . ' "' ] )
53+ @servers ([' web' => ' -q - A ' . $sshOptions . ' "' . $server . ' "' ] )
5654
5755@task (' deploy:setup' )
5856 if [ ! -d "{{ $releasesPath } } " ]; then
7068
7169@task (' deploy:check' )
7270 if [ ! -d "{{ $releasesPath } } " ]; then
73- echo "Releases path not found."
71+ echo "Releases path not found." 1> & 2 ;
7472 exit 1
7573 fi
7674
7775 if [ ! -d "{{ $sharedPath } } " ]; then
78- echo "Shared path not found."
76+ echo "Shared path not found." 1> & 2 ;
7977 exit 1
8078 fi
8179
8280 if [ ! -d "{{ $backupsPath } } " ]; then
83- echo "Backups path not found."
81+ echo "Backups path not found." 1> & 2 ;
8482 exit 1
8583 fi
8684@endtask
8785
8886@macro (' deploy' )
87+ deploy:assert_commit
8988 deploy:starting
9089 deploy:check
9190 deploy:started
109108 deploy:revert_release
110109@endmacro
111110
111+ @task (' deploy:assert_commit' )
112+ @if (! $commitHash )
113+ echo "No commit hash/tag was provided. Please provide one using --commit." 1>&2 ;
114+ exit 1
115+ @endif
116+ @endtask
117+
112118@task (' deploy:update_code' )
113119 export GIT_SSH_COMMAND="ssh -o PasswordAuthentication=no -o StrictHostKeyChecking=no"
114120
You can’t perform that action at this time.
0 commit comments