File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 73
73
task ('deploy:update_code ' , function () {
74
74
$ strategy = get ('update_code_strategy ' );
75
75
$ target = get ('target ' );
76
+ $ git = get ('bin/git ' );
76
77
77
78
$ targetWithDir = $ target ;
78
79
if (!empty (get ('sub_directory ' ))) {
79
80
$ targetWithDir .= ':{{sub_directory}} ' ;
80
81
}
81
82
82
83
if ($ strategy === 'local_archive ' ) {
83
- $ host = currentHost ()->connectionString ();
84
-
85
- // Copy to release_path.
86
- runLocally (<<<BASH
87
- git archive {$ targetWithDir } | ssh {$ host } "tar -x -f - -C {{release_path}} 2>&1"
88
- BASH );
84
+ runLocally ("$ git archive $ targetWithDir -o archive.tar " );
85
+ upload ('archive.tar ' , '{{release_path}}/archive.tar ' );
86
+ run ("tar -xf {{release_path}}/archive.tar -C {{release_path}} " );
87
+ run ("rm {{release_path}}/archive.tar " );
88
+ unlink ('archive.tar ' );
89
89
90
90
$ rev = escapeshellarg (runLocally ("git rev-list $ target -1 " ));
91
91
} else {
92
- $ git = get ('bin/git ' );
93
92
$ repository = get ('repository ' );
94
93
95
94
if (empty ($ repository )) {
You can’t perform that action at this time.
0 commit comments