buildx: ensure consistent metadata filename for bake and build
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -52,7 +52,7 @@ export class Bake {
|
||||
}
|
||||
|
||||
public static getMetadataFilePath(): string {
|
||||
return path.join(Context.tmpDir(), 'metadata-file');
|
||||
return path.join(Context.tmpDir(), 'bake-metadata.json');
|
||||
}
|
||||
|
||||
public static resolveMetadata(): BakeMetadata | undefined {
|
||||
|
||||
@@ -27,11 +27,7 @@ import {BuildMetadata} from '../types/build';
|
||||
|
||||
export class Build {
|
||||
public static getImageIDFilePath(): string {
|
||||
return path.join(Context.tmpDir(), 'iidfile');
|
||||
}
|
||||
|
||||
public static getMetadataFilePath(): string {
|
||||
return path.join(Context.tmpDir(), 'metadata-file');
|
||||
return path.join(Context.tmpDir(), 'build-iidfile.txt');
|
||||
}
|
||||
|
||||
public static resolveImageID(): string | undefined {
|
||||
@@ -42,6 +38,10 @@ export class Build {
|
||||
return fs.readFileSync(iidFile, {encoding: 'utf-8'}).trim();
|
||||
}
|
||||
|
||||
public static getMetadataFilePath(): string {
|
||||
return path.join(Context.tmpDir(), 'build-metadata.json');
|
||||
}
|
||||
|
||||
public static resolveMetadata(): BuildMetadata | undefined {
|
||||
const metadataFile = Build.getMetadataFilePath();
|
||||
if (!fs.existsSync(metadataFile)) {
|
||||
|
||||
Reference in New Issue
Block a user