Skip to content

Commit

Permalink
fix(cli): update the migration scripts and docker build (#1835)
Browse files Browse the repository at this point in the history
* fix(cli): update the migration scripts as per workspaces

gh-1832

* fix(cli): update the migration scripts as per workspaces

gh-1834

* fix(cli): change migration scripts

gh-1834
  • Loading branch information
yeshamavani authored Dec 8, 2023
1 parent cb7e236 commit b23d969
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/cli/src/generators/microservice/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,16 @@ export default class MicroserviceGenerator extends AppGenerator<MicroserviceOpti
'node -r ./dist/opentelemetry-registry.js -r source-map-support/register .';
scripts[
'docker:build'
] = `DOCKER_BUILDKIT=1 sudo docker build --build-arg NR_ENABLED=$NR_ENABLED_VALUE -t $IMAGE_REPO_NAME/${this.options.uniquePrefix}-$npm_package_name:$npm_package_version .`;
] = `DOCKER_BUILDKIT=1 sudo docker build --build-arg NR_ENABLED=$NR_ENABLED_VALUE -t $IMAGE_REPO_NAME/$npm_package_name:$npm_package_version .`;
scripts[
'docker:push'
] = `sudo docker push $IMAGE_REPO_NAME/${this.options.uniquePrefix}-$npm_package_name:$npm_package_version`;
] = `sudo docker push $IMAGE_REPO_NAME/$npm_package_name:$npm_package_version`;
scripts[
'docker:build:dev'
] = `DOCKER_BUILDKIT=1 sudo docker build --build-arg NR_ENABLED=$NR_ENABLED_VALUE -t $IMAGE_REPO_NAME/${this.options.uniquePrefix}-$npm_package_name:$IMAGE_TAG_VERSION .`;
] = `DOCKER_BUILDKIT=1 sudo docker build --build-arg NR_ENABLED=$NR_ENABLED_VALUE -t $IMAGE_REPO_NAME/$npm_package_name:$IMAGE_TAG_VERSION .`;
scripts[
'docker:push:dev'
] = `sudo docker push $IMAGE_REPO_NAME/${this.options.uniquePrefix}-$npm_package_name:$IMAGE_TAG_VERSION`;
] = `sudo docker push $IMAGE_REPO_NAME/$npm_package_name:$IMAGE_TAG_VERSION`;
scripts['coverage'] = 'nyc npm run test';

packageJson.scripts = scripts;
Expand All @@ -230,7 +230,7 @@ export default class MicroserviceGenerator extends AppGenerator<MicroserviceOpti
await this.spawnCommand('npm', ['i']);

await this.addMigrations();
this._appendDockerScript();
// this._appendDockerScript();
return true;
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"private": true,
"scripts": {
"prepare": "husky install",
"test": "lerna run test"
"test": "lerna run test",
"migrate": "npm run db:migrate --workspaces --if-present",
"build": "npm run build --workspaces --if-present"
},
"devDependencies": {
"@commitlint/cli": "^16.1.0",
Expand Down

0 comments on commit b23d969

Please sign in to comment.