From 8419327ab65ce869aadff7cd99e40cc14df23c11 Mon Sep 17 00:00:00 2001 From: Dominique Quatravaux Date: Wed, 29 May 2024 09:20:20 +0200 Subject: [PATCH] [depends] `percolate:meteor-synced-cron` at (forked) version 2.0.0 Because `percolate:meteor-synced-cron` uses MongoDB to store its state, we need to merge in [PR 149](https://github.com/percolatestudio/meteor-synced-cron/pull/149) for Meteor 3.0 compatibility, which the maintainer has yet to do at the time of this commit. - Make it so that all the runtime environments (`Makefile` for development; `Dockerfile` for integration and production) apply the [proper technique](https://guide.meteor.com/v1.3/writing-atmosphere-packages.html#overriding-atmosphere-packages) to use the forked package - Enroll the forked package into `.meteor/packages` / `.meteor/versions` with ```shell meteor add percolate:synced-cron ``` --- Dockerfile | 4 +++- Makefile | 8 ++++++-- app/.meteor/packages | 1 + app/.meteor/versions | 1 + 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 43d3f1a..06f1336 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,13 @@ FROM ubuntu:focal ENV METEOR_VERSION=3.0-rc.2 -RUN apt -qy update && apt -qy install curl build-essential python3 +RUN apt -qy update && apt -qy install curl build-essential python3 git RUN curl https://install.meteor.com/?release=$METEOR_VERSION | bash -e -x COPY ./app /usr/src/app/ WORKDIR /usr/src/app/ +RUN set -e -x; rm -rf packages/; mkdir packages; cd packages; \ + git clone -b update-to-async https://@github.com/sebastianspiller/meteor-synced-cron RUN meteor npm i RUN BROWSERSLIST_IGNORE_OLD_DATA=1 meteor build --allow-superuser /usr --directory RUN cd /usr/bundle/programs/server && meteor npm install diff --git a/Makefile b/Makefile index 4e80b0e..fc0e030 100644 --- a/Makefile +++ b/Makefile @@ -54,12 +54,12 @@ print-env: check-env @echo "MOCHA_TIMEOUT=${MOCHA_TIMEOUT}" .PHONY: meteor -meteor: check-env +meteor: check-env app/packages/meteor-synced-cron @echo '**** Start meteor: ****' cd app/; env WP_VERITAS_BOT_TOKEN=$$WP_VERITAS_BOT_TOKEN_TEST WP_VERITAS_ALERTS_TELEGRAM_IDS=$$WP_VERITAS_ALERTS_TELEGRAM_IDS_TEST WP_VERITAS_AWX_TOKEN=$$AWX_TOKEN meteor --settings meteor-settings.json .PHONY: test -test: check-env +test: check-env app/packages/meteor-synced-cron @echo '**** Run test: ****' @cd app; env MOCHA_TIMEOUT=$$MOCHA_TIMEOUT WP_VERITAS_BOT_TOKEN=$$WP_VERITAS_BOT_TOKEN_TEST WP_VERITAS_ALERTS_TELEGRAM_IDS=$$WP_VERITAS_ALERTS_TELEGRAM_IDS_TEST TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha --port 3888 @@ -189,6 +189,10 @@ publish: $(MAKE) docker-push $(MAKE) git-tag +app/packages/meteor-synced-cron: + @mkdir -p $(dir $@) || true + cd $(dir $@); git clone -b update-to-async git@github.com:sebastianspiller/meteor-synced-cron.git + ################################################################################ # Targets for development purpose only # ################################################################################ diff --git a/app/.meteor/packages b/app/.meteor/packages index f471b17..8ecaff9 100644 --- a/app/.meteor/packages +++ b/app/.meteor/packages @@ -32,3 +32,4 @@ harrison:papa-parse # Export CSV pfafman:filesaver # Export CSV alanning:roles@4.0.0-alpha.2 ostrio:logger +percolate:synced-cron diff --git a/app/.meteor/versions b/app/.meteor/versions index 0252448..3214d11 100644 --- a/app/.meteor/versions +++ b/app/.meteor/versions @@ -66,6 +66,7 @@ observe-sequence@2.0.0-alpha300.17 ordered-dict@1.2.0-rc300.2 ostrio:logger@2.1.1 peppelg:bootstrap-3-modal@1.0.4 +percolate:synced-cron@2.0.0 pfafman:filesaver@1.3.2_1 promise@1.0.0-rc300.2 random@1.2.2-rc300.2