Merge pull request #1679 from jeskosda/feat/buildImagePatch
fix(build-imgae): get package name from env
This commit is contained in:
@@ -19,8 +19,12 @@ import { createDistWorkspace } from '../../lib/packager';
|
||||
import { paths } from '../../lib/paths';
|
||||
import { run } from '../../lib/run';
|
||||
|
||||
const PKG_PATH = 'package.json';
|
||||
|
||||
export default async (imageTag: string) => {
|
||||
const tempDistWorkspace = await createDistWorkspace(['example-backend'], {
|
||||
const pkgPath = paths.resolveTarget(PKG_PATH);
|
||||
const pkg = await fs.readJson(pkgPath);
|
||||
const tempDistWorkspace = await createDistWorkspace([pkg.name], {
|
||||
files: [
|
||||
'package.json',
|
||||
'yarn.lock',
|
||||
@@ -28,7 +32,6 @@ export default async (imageTag: string) => {
|
||||
{ src: paths.resolveTarget('Dockerfile'), dest: 'Dockerfile' },
|
||||
],
|
||||
});
|
||||
|
||||
console.log(`Dist workspace ready at ${tempDistWorkspace}`);
|
||||
|
||||
await run('docker', ['build', '.', '-t', imageTag], {
|
||||
|
||||
Reference in New Issue
Block a user