From 1e6d3d87fb038fa304c9774315a8d5250e1af50b Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 11 Oct 2024 23:34:44 +0530 Subject: [PATCH] chore: update version in package.json Signed-off-by: Pranav C --- .github/workflows/release-timely-docker.yml | 15 ++++++++++++--- packages/nocodb/src/services/utils.service.ts | 7 +++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-timely-docker.yml b/.github/workflows/release-timely-docker.yml index 76c50beda0..b924d29087 100644 --- a/.github/workflows/release-timely-docker.yml +++ b/.github/workflows/release-timely-docker.yml @@ -52,7 +52,7 @@ jobs: - name: Get Docker Repository id: get-docker-repository run: | - DOCKER_REPOSITORY=nocodb + DOCKER_REPOSITORY=nocodb-daily DOCKER_BUILD_TAG=${{ github.event.inputs.tag || inputs.tag }} DOCKER_BUILD_LATEST_TAG=latest if [[ "$DOCKER_BUILD_TAG" =~ "-beta." ]]; then @@ -106,7 +106,16 @@ jobs: cd packages/nocodb && EE=true pnpm exec webpack --config webpack.timely.config.js && # remove bundled libraries (nocodb-sdk, knex-snowflake) - pnpm uninstall --save-prod nocodb-sdk + pnpm uninstall --save-prod nocodb-sdk + + - name: Update version in package.json + run: | + # update package.json + cd packages/nocodb && + jq --arg VERSION "$VERSION" '.version = $VERSION' package.json > tmp.json && + mv tmp.json package.json + env: + VERSION: ${{ steps.get-docker-repository.outputs.DOCKER_BUILD_TAG }} - name: Set up QEMU uses: docker/setup-qemu-action@v2.1.0 @@ -137,7 +146,7 @@ jobs: platforms: linux/amd64,linux/arm64,linux/arm/v7 cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new - push: false + push: true tags: | nocodb/${{ steps.get-docker-repository.outputs.DOCKER_REPOSITORY }}:${{ steps.get-docker-repository.outputs.DOCKER_BUILD_TAG }} nocodb/${{ steps.get-docker-repository.outputs.DOCKER_REPOSITORY }}:${{ steps.get-docker-repository.outputs.DOCKER_BUILD_LATEST_TAG }} diff --git a/packages/nocodb/src/services/utils.service.ts b/packages/nocodb/src/services/utils.service.ts index 0079ccc83a..53072e0cb3 100644 --- a/packages/nocodb/src/services/utils.service.ts +++ b/packages/nocodb/src/services/utils.service.ts @@ -80,7 +80,7 @@ export class UtilsService { constructor(protected readonly configService: ConfigService) {} - lastSyncTime = dayjs(); + lastSyncTime = null; async versionInfo() { if ( @@ -526,7 +526,10 @@ export class UtilsService { } let payload = null; - if (dayjs().isAfter(this.lastSyncTime.add(3, 'hours'))) { + if ( + !this.lastSyncTime || + dayjs().isAfter(this.lastSyncTime.add(3, 'hours')) + ) { payload = await T.payload(); this.lastSyncTime = dayjs(); }