From 8ab79ca5514fbd1999f1894f61fe891f5172dc2a Mon Sep 17 00:00:00 2001 From: NicoSerranoP Date: Wed, 31 Jan 2024 17:30:44 -0500 Subject: [PATCH 1/3] workflow(fix): silent sed errors --- .github/workflows/firebase-deploy-dev.yaml | 4 ++-- .github/workflows/firebase-deploy-staging.yaml | 4 ++-- .github/workflows/publish-dev-packages.yaml | 14 +++++++------- .github/workflows/publish-staging-packages.yaml | 14 +++++++------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/firebase-deploy-dev.yaml b/.github/workflows/firebase-deploy-dev.yaml index e496f051..0fc8ff3e 100644 --- a/.github/workflows/firebase-deploy-dev.yaml +++ b/.github/workflows/firebase-deploy-dev.yaml @@ -39,10 +39,10 @@ jobs: shopt -s globstar # Update package.json dependencies - sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@devtion\/actions": "latest"/g' ./packages/backend/package.json + sed -i -e -s 's/"@p0tion\/actions": "[^"]*"/"@devtion\/actions": "latest"/g' ./packages/backend/package.json # Update string literals in TypeScript files - sed -i 's|p0tion/actions|devtion/actions|g' packages/**/*.ts + sed -i -s 's|p0tion/actions|devtion/actions|g' packages/**/*.ts cat ./packages/backend/package.json cat ./packages/backend/src/functions/ceremony.ts diff --git a/.github/workflows/firebase-deploy-staging.yaml b/.github/workflows/firebase-deploy-staging.yaml index 9b07ef1a..12da4de0 100644 --- a/.github/workflows/firebase-deploy-staging.yaml +++ b/.github/workflows/firebase-deploy-staging.yaml @@ -39,10 +39,10 @@ jobs: shopt -s globstar # Update package.json dependencies - sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/backend/package.json + sed -i -e -s 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/backend/package.json # Update string literals in TypeScript files - sed -i 's|p0tion/actions|stagtion/actions|g' packages/**/*.ts + sed -i -s 's|p0tion/actions|stagtion/actions|g' packages/**/*.ts - name: Install npm packages and write env run: | diff --git a/.github/workflows/publish-dev-packages.yaml b/.github/workflows/publish-dev-packages.yaml index 12ecf687..ea420d4e 100644 --- a/.github/workflows/publish-dev-packages.yaml +++ b/.github/workflows/publish-dev-packages.yaml @@ -34,17 +34,17 @@ jobs: shopt -s globstar # Update package.json dependencies - sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@devtion\/actions": "latest"/g' ./packages/backend/package.json - sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@devtion\/actions": "latest"/g' ./packages/phase2cli/package.json + sed -i -e -s 's/"@p0tion\/actions": "[^"]*"/"@devtion\/actions": "latest"/g' ./packages/backend/package.json + sed -i -e -s 's/"@p0tion\/actions": "[^"]*"/"@devtion\/actions": "latest"/g' ./packages/phase2cli/package.json # Update package names - sed -i -e 's/"name": "@p0tion\/phase2cli"/"name": "@devtion\/devcli"/g' ./packages/phase2cli/package.json - sed -i -e 's/"name": "@p0tion\/backend"/"name": "@devtion\/backend"/g' ./packages/backend/package.json - sed -i -e 's/"name": "@p0tion\/actions"/"name": "@devtion\/actions"/g' ./packages/actions/package.json + sed -i -e -s 's/"name": "@p0tion\/phase2cli"/"name": "@devtion\/devcli"/g' ./packages/phase2cli/package.json + sed -i -e -s 's/"name": "@p0tion\/backend"/"name": "@devtion\/backend"/g' ./packages/backend/package.json + sed -i -e -s 's/"name": "@p0tion\/actions"/"name": "@devtion\/actions"/g' ./packages/actions/package.json # Update string literals in TypeScript and JS files - sed -i 's|p0tion/actions|devtion/actions|g' packages/**/*.ts - sed -i 's|p0tion/actions|devtion/actions|g' packages/**/*.js + sed -i -s 's|p0tion/actions|devtion/actions|g' packages/**/*.ts + sed -i -s 's|p0tion/actions|devtion/actions|g' packages/**/*.js - name: Install lerna run: | diff --git a/.github/workflows/publish-staging-packages.yaml b/.github/workflows/publish-staging-packages.yaml index 6eb110ec..352fac94 100644 --- a/.github/workflows/publish-staging-packages.yaml +++ b/.github/workflows/publish-staging-packages.yaml @@ -34,17 +34,17 @@ jobs: shopt -s globstar # Update package.json dependencies - sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/backend/package.json - sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/phase2cli/package.json + sed -i -e -s 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/backend/package.json + sed -i -e -s 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/phase2cli/package.json # Update package names - sed -i -e 's/"name": "@p0tion\/phase2cli"/"name": "@stagtion\/stagcli"/g' ./packages/phase2cli/package.json - sed -i -e 's/"name": "@p0tion\/backend"/"name": "@stagtion\/backend"/g' ./packages/backend/package.json - sed -i -e 's/"name": "@p0tion\/actions"/"name": "@stagtion\/actions"/g' ./packages/actions/package.json + sed -i -e -s 's/"name": "@p0tion\/phase2cli"/"name": "@stagtion\/stagcli"/g' ./packages/phase2cli/package.json + sed -i -e -s 's/"name": "@p0tion\/backend"/"name": "@stagtion\/backend"/g' ./packages/backend/package.json + sed -i -e -s 's/"name": "@p0tion\/actions"/"name": "@stagtion\/actions"/g' ./packages/actions/package.json # Update string literals in TypeScript and JS files - sed -i 's|p0tion/actions|stagtion/actions|g' packages/**/*.ts - sed -i 's|p0tion/actions|stagtion/actions|g' packages/**/*.js + sed -i -s 's|p0tion/actions|stagtion/actions|g' packages/**/*.ts + sed -i -s 's|p0tion/actions|stagtion/actions|g' packages/**/*.js - name: Install lerna run: | From ae6a4840f5ae62f8a60f94e989b86b8ca7c7d284 Mon Sep 17 00:00:00 2001 From: NicoSerranoP Date: Wed, 31 Jan 2024 18:44:23 -0500 Subject: [PATCH 2/3] workflow(fix): exclude node modules + remove -s --- .github/workflows/firebase-deploy-dev.yaml | 4 ++-- .github/workflows/firebase-deploy-staging.yaml | 4 ++-- .github/workflows/publish-dev-packages.yaml | 14 +++++++------- .github/workflows/publish-staging-packages.yaml | 14 +++++++------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/firebase-deploy-dev.yaml b/.github/workflows/firebase-deploy-dev.yaml index 0fc8ff3e..0903cf20 100644 --- a/.github/workflows/firebase-deploy-dev.yaml +++ b/.github/workflows/firebase-deploy-dev.yaml @@ -39,10 +39,10 @@ jobs: shopt -s globstar # Update package.json dependencies - sed -i -e -s 's/"@p0tion\/actions": "[^"]*"/"@devtion\/actions": "latest"/g' ./packages/backend/package.json + sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@devtion\/actions": "latest"/g' ./packages/backend/package.json # Update string literals in TypeScript files - sed -i -s 's|p0tion/actions|devtion/actions|g' packages/**/*.ts + find packages -type f -name '*.ts' ! -path '*/node_modules/*' -exec sed -i 's|p0tion/actions|devtion/actions|g' {} + cat ./packages/backend/package.json cat ./packages/backend/src/functions/ceremony.ts diff --git a/.github/workflows/firebase-deploy-staging.yaml b/.github/workflows/firebase-deploy-staging.yaml index 12da4de0..708adaac 100644 --- a/.github/workflows/firebase-deploy-staging.yaml +++ b/.github/workflows/firebase-deploy-staging.yaml @@ -39,10 +39,10 @@ jobs: shopt -s globstar # Update package.json dependencies - sed -i -e -s 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/backend/package.json + sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/backend/package.json # Update string literals in TypeScript files - sed -i -s 's|p0tion/actions|stagtion/actions|g' packages/**/*.ts + find packages -type f -name '*.ts' ! -path '*/node_modules/*' -exec sed -i 's|p0tion/actions|devtion/actions|g' {} + - name: Install npm packages and write env run: | diff --git a/.github/workflows/publish-dev-packages.yaml b/.github/workflows/publish-dev-packages.yaml index ea420d4e..f9c9113f 100644 --- a/.github/workflows/publish-dev-packages.yaml +++ b/.github/workflows/publish-dev-packages.yaml @@ -34,17 +34,17 @@ jobs: shopt -s globstar # Update package.json dependencies - sed -i -e -s 's/"@p0tion\/actions": "[^"]*"/"@devtion\/actions": "latest"/g' ./packages/backend/package.json - sed -i -e -s 's/"@p0tion\/actions": "[^"]*"/"@devtion\/actions": "latest"/g' ./packages/phase2cli/package.json + sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@devtion\/actions": "latest"/g' ./packages/backend/package.json + sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@devtion\/actions": "latest"/g' ./packages/phase2cli/package.json # Update package names - sed -i -e -s 's/"name": "@p0tion\/phase2cli"/"name": "@devtion\/devcli"/g' ./packages/phase2cli/package.json - sed -i -e -s 's/"name": "@p0tion\/backend"/"name": "@devtion\/backend"/g' ./packages/backend/package.json - sed -i -e -s 's/"name": "@p0tion\/actions"/"name": "@devtion\/actions"/g' ./packages/actions/package.json + sed -i -e 's/"name": "@p0tion\/phase2cli"/"name": "@devtion\/devcli"/g' ./packages/phase2cli/package.json + sed -i -e 's/"name": "@p0tion\/backend"/"name": "@devtion\/backend"/g' ./packages/backend/package.json + sed -i -e 's/"name": "@p0tion\/actions"/"name": "@devtion\/actions"/g' ./packages/actions/package.json # Update string literals in TypeScript and JS files - sed -i -s 's|p0tion/actions|devtion/actions|g' packages/**/*.ts - sed -i -s 's|p0tion/actions|devtion/actions|g' packages/**/*.js + find packages -type f -name '*.ts' ! -path '*/node_modules/*' -exec sed -i 's|p0tion/actions|devtion/actions|g' {} + + find packages -type f -name '*.js' ! -path '*/node_modules/*' -exec sed -i 's|p0tion/actions|devtion/actions|g' {} + - name: Install lerna run: | diff --git a/.github/workflows/publish-staging-packages.yaml b/.github/workflows/publish-staging-packages.yaml index 352fac94..c24690fe 100644 --- a/.github/workflows/publish-staging-packages.yaml +++ b/.github/workflows/publish-staging-packages.yaml @@ -34,17 +34,17 @@ jobs: shopt -s globstar # Update package.json dependencies - sed -i -e -s 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/backend/package.json - sed -i -e -s 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/phase2cli/package.json + sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/backend/package.json + sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/phase2cli/package.json # Update package names - sed -i -e -s 's/"name": "@p0tion\/phase2cli"/"name": "@stagtion\/stagcli"/g' ./packages/phase2cli/package.json - sed -i -e -s 's/"name": "@p0tion\/backend"/"name": "@stagtion\/backend"/g' ./packages/backend/package.json - sed -i -e -s 's/"name": "@p0tion\/actions"/"name": "@stagtion\/actions"/g' ./packages/actions/package.json + sed -i -e 's/"name": "@p0tion\/phase2cli"/"name": "@stagtion\/stagcli"/g' ./packages/phase2cli/package.json + sed -i -e 's/"name": "@p0tion\/backend"/"name": "@stagtion\/backend"/g' ./packages/backend/package.json + sed -i -e 's/"name": "@p0tion\/actions"/"name": "@stagtion\/actions"/g' ./packages/actions/package.json # Update string literals in TypeScript and JS files - sed -i -s 's|p0tion/actions|stagtion/actions|g' packages/**/*.ts - sed -i -s 's|p0tion/actions|stagtion/actions|g' packages/**/*.js + find packages -type f -name '*.ts' ! -path '*/node_modules/*' -exec sed -i 's|p0tion/actions|stagtion/actions|g' {} + + find packages -type f -name '*.js' ! -path '*/node_modules/*' -exec sed -i 's|p0tion/actions|stagtion/actions|g' {} + - name: Install lerna run: | From 16d1aadcc13fe333ee750a68515391dff46e7bda Mon Sep 17 00:00:00 2001 From: NicoSerranoP Date: Wed, 31 Jan 2024 18:48:49 -0500 Subject: [PATCH 3/3] workflow(fix): stag instead of dev --- .github/workflows/firebase-deploy-staging.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firebase-deploy-staging.yaml b/.github/workflows/firebase-deploy-staging.yaml index 708adaac..ca54433e 100644 --- a/.github/workflows/firebase-deploy-staging.yaml +++ b/.github/workflows/firebase-deploy-staging.yaml @@ -42,7 +42,7 @@ jobs: sed -i -e 's/"@p0tion\/actions": "[^"]*"/"@stagtion\/actions": "latest"/g' ./packages/backend/package.json # Update string literals in TypeScript files - find packages -type f -name '*.ts' ! -path '*/node_modules/*' -exec sed -i 's|p0tion/actions|devtion/actions|g' {} + + find packages -type f -name '*.ts' ! -path '*/node_modules/*' -exec sed -i 's|p0tion/actions|stagtion/actions|g' {} + - name: Install npm packages and write env run: |