From 49636f19c970d0de3e431b38b3b024ef918cc03b Mon Sep 17 00:00:00 2001 From: Chris Chudzicki Date: Wed, 7 Aug 2024 14:44:22 -0400 Subject: [PATCH] test change --- .github/workflows/rc_test.yml | 36 ++++++++++++++++++++++++++++ frontends/mit-open/webpack.config.js | 6 +++++ scripts/get_version.sh | 4 ++-- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/rc_test.yml diff --git a/.github/workflows/rc_test.yml b/.github/workflows/rc_test.yml new file mode 100644 index 0000000000..618f6f4902 --- /dev/null +++ b/.github/workflows/rc_test.yml @@ -0,0 +1,36 @@ +name: CI +on: [push] +jobs: + test-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + with: + ref: release-candidate + + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + with: + node-version: "^20" + cache: yarn + cache-dependency-path: yarn.lock + + - name: Setup environment + run: sudo apt-get install libelf1 + + - name: Set Cat + run: echo "MEOW=meowzah" >> "$GITHUB_ENV" + + - name: Log MEOW + run: echo hello MEOW is $MEOW + + - name: Set VERSION + run: echo "VERSION=$(./scripts/get_version.sh)" >> "$GITHUB_ENV" + + - name: Log version + run: echo hello version is $VERSION + + - run: grep -E 'VERSION = .*([0-9]+)\.[0-9]+\.[0-9]+.*' main/settings.py + - run: grep -E 'VERSION\s+= .*([0-9]+)\.[0-9]+\.[0-9]+.*' main/settings.py + - run: grep -Eo -m 1 'VERSION\s+= .*([0-9]+)\.[0-9]+\.[0-9]+.*' main/settings.py + + - run: ./scripts/get_version.sh diff --git a/frontends/mit-open/webpack.config.js b/frontends/mit-open/webpack.config.js index 3a1910404d..b53794494b 100644 --- a/frontends/mit-open/webpack.config.js +++ b/frontends/mit-open/webpack.config.js @@ -39,6 +39,7 @@ const { EMBEDLY_KEY, CKEDITOR_UPLOAD_URL, SENTRY_DSN, + SENTRY_ENV, } = cleanEnv(process.env, { NODE_ENV: str({ choices: ["development", "production", "test"], @@ -99,6 +100,10 @@ const { }), }) +console.log("HELLO FROM WEBPACK") +console.log("SENTRY_ENV", SENTRY_ENV) +console.log("VERSION", VERSION) + const MITOPEN_FEATURES_PREFIX = "FEATURE_" const getFeatureFlags = () => { @@ -217,6 +222,7 @@ module.exports = (env, argv) => { CKEDITOR_UPLOAD_URL: JSON.stringify(CKEDITOR_UPLOAD_URL), VERSION: JSON.stringify(VERSION), SENTRY_DSN: JSON.stringify(SENTRY_DSN), + SENTRY_ENV: JSON.stringify(SENTRY_ENV), POSTHOG: getPostHogSettings(), SITE_NAME: JSON.stringify(SITE_NAME), MITOPEN_SUPPORT_EMAIL: JSON.stringify(MITOPEN_SUPPORT_EMAIL), diff --git a/scripts/get_version.sh b/scripts/get_version.sh index dae20c2e97..3a634eeebd 100755 --- a/scripts/get_version.sh +++ b/scripts/get_version.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Get VERSION from settings.py -grep -Eo -m 1 'VERSION\s+= .*(\d+)\.\d+\.\d+.*' main/settings.py | +grep -Eo -m 1 'VERSION\s+= .*([0-9]+)\.[0-9]+\.[0-9]+.*' main/settings.py | head -1 | - grep -Eo "\d+\.\d+\.\d+" + grep -Eo "[0-9]+\.[0-9]+\.[0-9]+"