@@ -102,6 +102,7 @@ export class Install {
102
102
}
103
103
104
104
public async installStandalone ( toolPath : string , dest ?: string ) : Promise < string > {
105
+ core . info ( 'Standalone mode' ) ;
105
106
dest = dest || this . context . tmpDir ( ) ;
106
107
const toolBinPath = path . join ( toolPath , os . platform ( ) == 'win32' ? 'docker-buildx.exe' : 'docker-buildx' ) ;
107
108
const binDir = path . join ( dest , 'bin' ) ;
@@ -111,13 +112,19 @@ export class Install {
111
112
const filename : string = os . platform ( ) == 'win32' ? 'buildx.exe' : 'buildx' ;
112
113
const buildxPath : string = path . join ( binDir , filename ) ;
113
114
fs . copyFileSync ( toolBinPath , buildxPath ) ;
115
+
116
+ core . info ( 'Fixing perms' ) ;
114
117
fs . chmodSync ( buildxPath , '0755' ) ;
118
+
115
119
core . addPath ( binDir ) ;
116
- core . debug ( `Install.installStandalone buildxPath: ${ buildxPath } ` ) ;
120
+ core . info ( 'Added Buildx to PATH' ) ;
121
+
122
+ core . info ( `Binary path: ${ buildxPath } ` ) ;
117
123
return buildxPath ;
118
124
}
119
125
120
126
public async installPlugin ( toolPath : string , dest ?: string ) : Promise < string > {
127
+ core . info ( 'Docker plugin mode' ) ;
121
128
dest = dest || Docker . configDir ;
122
129
const toolBinPath = path . join ( toolPath , os . platform ( ) == 'win32' ? 'docker-buildx.exe' : 'docker-buildx' ) ;
123
130
const pluginsDir : string = path . join ( dest , 'cli-plugins' ) ;
@@ -127,8 +134,11 @@ export class Install {
127
134
const filename : string = os . platform ( ) == 'win32' ? 'docker-buildx.exe' : 'docker-buildx' ;
128
135
const pluginPath : string = path . join ( pluginsDir , filename ) ;
129
136
fs . copyFileSync ( toolBinPath , pluginPath ) ;
137
+
138
+ core . info ( 'Fixing perms' ) ;
130
139
fs . chmodSync ( pluginPath , '0755' ) ;
131
- core . debug ( `Install.installPlugin pluginPath: ${ pluginPath } ` ) ;
140
+
141
+ core . info ( `Plugin path: ${ pluginPath } ` ) ;
132
142
return pluginPath ;
133
143
}
134
144
@@ -172,9 +182,9 @@ export class Install {
172
182
private async fetchBinary ( version : string ) : Promise < string > {
173
183
const targetFile : string = os . platform ( ) == 'win32' ? 'docker-buildx.exe' : 'docker-buildx' ;
174
184
const downloadURL = util . format ( 'https://github.com/docker/buildx/releases/download/v%s/%s' , version , this . filename ( version ) ) ;
185
+ core . info ( `Downloading ${ downloadURL } ` ) ;
175
186
const downloadPath = await tc . downloadTool ( downloadURL ) ;
176
- core . debug ( `downloadURL: ${ downloadURL } ` ) ;
177
- core . debug ( `downloadPath: ${ downloadPath } ` ) ;
187
+ core . debug ( `Install.fetchBinary downloadPath: ${ downloadPath } ` ) ;
178
188
return await tc . cacheFile ( downloadPath , targetFile , 'buildx' , version ) ;
179
189
}
180
190
0 commit comments