diff --git a/.github/workflows/release-gitflow.yml b/.github/workflows/release-gitflow.yml index 282e45ebbd1..569542b8cf5 100644 --- a/.github/workflows/release-gitflow.yml +++ b/.github/workflows/release-gitflow.yml @@ -49,9 +49,6 @@ jobs: git checkout develop git merge -X ours master - - name: Run post-merge-master script to revert package.json fields - run: ./.action-repo/scripts/release/post-merge-master.sh - - name: Reset dependencies if: inputs.dependencies run: | diff --git a/.github/workflows/release-make.yml b/.github/workflows/release-make.yml index 38745231602..2900ade4231 100644 --- a/.github/workflows/release-make.yml +++ b/.github/workflows/release-make.yml @@ -158,11 +158,6 @@ jobs: env: RELEASE_NOTES: ${{ steps.draft-release.outputs.body }} - - name: Run pre-release script to update package.json fields - run: | - ./.action-repo/scripts/release/pre-release.sh - git add package.json - - name: Commit changes run: git commit -m "$VERSION" diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index a0afd01863c..7c3be28e614 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -26,16 +26,6 @@ jobs: - name: Typecheck run: "yarn run lint:types" - - name: Switch js-sdk to release mode - run: | - scripts/switch_package_to_release.js - yarn install - yarn run build:compile - yarn run build:types - - - name: Typecheck (release mode) - run: "yarn run lint:types" - js_lint: name: "ESLint" runs-on: ubuntu-24.04 diff --git a/scripts/release/post-merge-master.sh b/scripts/release/post-merge-master.sh deleted file mode 100755 index e76d6422111..00000000000 --- a/scripts/release/post-merge-master.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# When merging to develop, we need revert the `main` and `typings` fields if we adjusted them previously. -for i in main typings browser -do - # If a `lib` prefixed value is present, it means we adjusted the field earlier at publish time, so we should revert it now. - if [ "$(jq -r ".matrix_lib_$i" package.json)" != "null" ]; then - # If there's a `src` prefixed value, use that, otherwise delete. - # This is used to delete the `typings` field and reset `main` back to the TypeScript source. - src_value=$(jq -r ".matrix_src_$i" package.json) - if [ "$src_value" != "null" ]; then - jq ".$i = .matrix_src_$i" package.json > package.json.new && mv package.json.new package.json && yarn prettier --write package.json - else - jq "del(.$i)" package.json > package.json.new && mv package.json.new package.json && yarn prettier --write package.json - fi - fi -done - -if [ -n "$(git ls-files --modified package.json)" ]; then - echo "Committing develop package.json" - git commit package.json -m "Resetting package fields for development" -fi diff --git a/scripts/release/pre-release.sh b/scripts/release/pre-release.sh deleted file mode 100755 index 6b47ef180ff..00000000000 --- a/scripts/release/pre-release.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# For the published and dist versions of the package, -# we copy the `matrix_lib_main` and `matrix_lib_typings` fields to `main` and `typings` (if they exist). -# This small bit of gymnastics allows us to use the TypeScript source directly for development without -# needing to build before linting or testing. - -for i in main typings browser -do - lib_value=$(jq -r ".matrix_lib_$i" package.json) - if [ "$lib_value" != "null" ]; then - jq ".$i = .matrix_lib_$i" package.json > package.json.new && mv package.json.new package.json && yarn prettier --write package.json - fi -done diff --git a/scripts/switch_package_to_release.cjs b/scripts/switch_package_to_release.cjs deleted file mode 100755 index 6d857a4070a..00000000000 --- a/scripts/switch_package_to_release.cjs +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env node - -const fsProm = require("fs/promises"); - -const PKGJSON = "package.json"; - -async function main() { - const pkgJson = JSON.parse(await fsProm.readFile(PKGJSON, "utf8")); - for (const field of ["main", "typings"]) { - if (pkgJson["matrix_lib_" + field] !== undefined) { - pkgJson[field] = pkgJson["matrix_lib_" + field]; - } - } - - await fsProm.writeFile(PKGJSON, JSON.stringify(pkgJson, null, 2)); -} - -main(); diff --git a/scripts/switch_package_to_release.js b/scripts/switch_package_to_release.js deleted file mode 120000 index 27f1619c9a2..00000000000 --- a/scripts/switch_package_to_release.js +++ /dev/null @@ -1 +0,0 @@ -switch_package_to_release.cjs \ No newline at end of file