Commit bf57d21 1 parent e68702a commit bf57d21 Copy full SHA for bf57d21
File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ public static function configuration()
72
72
73
73
\Deployer \set ('artifacts_dir ' , 'artifacts ' );
74
74
75
+ \Deployer \set ('artifacts_compression ' , 'gz ' );
76
+
75
77
$ artifacts = [
76
78
'shop.tar.gz ' ,
77
79
];
Original file line number Diff line number Diff line change @@ -104,11 +104,20 @@ public static function linkEnvConfig()
104
104
*/
105
105
protected static function uploadAndExtract ($ tarFile )
106
106
{
107
+ $ compression = \Deployer \get ('artifacts_compression ' );
108
+ $ tarOptions = '' ;
109
+
110
+ if ($ compression === 'gz ' ) {
111
+ $ tarOptions = 'xfz ' ;
112
+ } elseif ($ compression === 'zstd ' ) {
113
+ $ tarOptions = '-I \'zstd -T0 \' -xf ' ;
114
+ }
115
+
107
116
$ releasePath = '{{release_path}} ' ;
108
117
109
118
\Deployer \upload ("{{artifacts_dir}}/ $ tarFile " , "$ releasePath/ $ tarFile " );
110
- \Deployer \run ("cd $ releasePath; tar xfz $ releasePath/ $ tarFile " );
119
+ \Deployer \run ("cd $ releasePath; tar $ tarOptions $ releasePath/ $ tarFile " );
111
120
\Deployer \run ("rm $ releasePath/ $ tarFile " );
112
121
}
113
122
114
- }
123
+ }
You can’t perform that action at this time.
0 commit comments