fix(build-imgae): get package name from env

This commit is contained in:
Jesko Steinberg
2020-07-17 12:56:41 +02:00
parent cfd50e0aad
commit cbb36ea3b9
@@ -20,7 +20,8 @@ import { paths } from '../../lib/paths';
import { run } from '../../lib/run';
export default async (imageTag: string) => {
const tempDistWorkspace = await createDistWorkspace(['example-backend'], {
const packageName: string = process.env.npm_package_name!;
const tempDistWorkspace = await createDistWorkspace([packageName], {
files: [
'package.json',
'yarn.lock',
@@ -28,7 +29,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], {