Skip to content

Commit

Permalink
fix: Update Docker and github action to do normal install no lock
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyRamirezLecca committed Dec 18, 2024
1 parent b52f2e1 commit 33a9548
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/publish-npm-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ jobs:
uses: pnpm/action-setup@v2
with:
version: 9
- run: pnpm install --frozen-lockfile
# pnpm install --frozen-lockfile
# Not using frozen lockfile because we need to install the
# latest version of @lecca-io libs so we update the version during the ci.
# This is a workaround until we have a better solution.
- run: pnpm install

- name: Build toolkit
run: pnpm nx build toolkit
Expand Down
6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,6 @@
"vitest": "^1.3.1",
"webpack-cli": "^5.1.4"
},
"pnpm": {
"overrides": {
"@lecca-io/toolkit": "0.10.0",
"@lecca-io/apps": "0.10.0"
}
},
"prisma": {
"schema": "./packages/server/prisma/schema.prisma"
},
Expand Down
6 changes: 5 additions & 1 deletion packages/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ COPY packages/apps ./packages/apps
RUN npm install -g pnpm @nestjs/cli nx

# Install dependencies
RUN pnpm install --frozen-lockfile
# RUN pnpm install --frozen-lockfile
# Not using frozen lockfile because we need to install the
# latest version of @lecca-io libs so we update the version during the ci.
# This is a workaround until we have a better solution.
RUN pnpm install

# Build server
RUN pnpm exec nx run server:build
Expand Down
6 changes: 5 additions & 1 deletion packages/ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ COPY packages/ui ./packages/ui
RUN npm install -g pnpm nx

# Install dependencies
RUN pnpm install --frozen-lockfile
# RUN pnpm install --frozen-lockfile
# Not using frozen lockfile because we need to install the
# latest version of @lecca-io libs so we update the version during the ci.
# This is a workaround until we have a better solution.
RUN pnpm install

# Build UI
RUN pnpm exec nx run ui:build --verbose
Expand Down
10 changes: 5 additions & 5 deletions scripts/update-package-versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ packagePaths.forEach((packagePath) => {
// If this is the root package.json, update the dependencies
// This is a hack to get the @lecca-io packages to always be the same version as the root package
if (packagePath === 'package.json') {
if (packageJson.pnpm && packageJson.pnpm.overrides) {
if (packageJson.pnpm.overrides['@lecca-io/toolkit']) {
packageJson.pnpm.overrides['@lecca-io/toolkit'] = newVersion;
if (packageJson.dependencies) {
if (packageJson.dependencies['@lecca-io/toolkit']) {
packageJson.dependencies['@lecca-io/toolkit'] = newVersion;
}
if (packageJson.pnpm.overrides['@lecca-io/apps']) {
packageJson.pnpm.overrides['@lecca-io/apps'] = newVersion;
if (packageJson.dependencies['@lecca-io/apps']) {
packageJson.dependencies['@lecca-io/apps'] = newVersion;
}
}
}
Expand Down

0 comments on commit 33a9548

Please sign in to comment.