From 2a3f523b91c8364a5bc68ae187bbd91af8953711 Mon Sep 17 00:00:00 2001 From: Rodrigo Gomez Palacio Date: Thu, 31 Aug 2023 16:17:30 -0500 Subject: [PATCH 1/3] Switch to add all changes with -A `git add .` : stages new and modified files in the current directory and below. `git add -u` : stages modifications and deletions, but not new files. `git add -A` : stages all changes (modifications, deletions, and new files). --- .github/workflows/cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b86951b..35d099e 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -41,7 +41,7 @@ jobs: tar zxvvf dist/onesignal-ngx.tgz -C __clone/ cd __clone/onesignal-ngx while read file; do git rm "$file"; done < ../../build/onesignal-ngx.rmfiles - git add . + git add -A if git commit -m "Update onesignal-ngx"; then echo "onesignal-ngx repository has been updated" else @@ -81,7 +81,7 @@ jobs: tar zxvvf dist/react.tgz -C __clone/ cd __clone/react while read file; do git rm "$file"; done < ../../build/react.rmfiles - git add . + git add -A if git commit -m "Update react-onesignal"; then echo "react-onesignal repository has been updated" else @@ -120,7 +120,7 @@ jobs: tar zxvvf dist/vue/v2.tgz -C __clone/ cd __clone/vue/v2 while read file; do git rm "$file"; done < ../../build/vue/v2.rmfiles - git add . + git add -A if git commit -m "Update onesignal-vue"; then echo "onesignal-vue repository has been updated" else @@ -159,7 +159,7 @@ jobs: tar zxvvf dist/vue/v3.tgz -C __clone/ cd __clone/vue/v3 while read file; do git rm "$file"; done < ../../build/vue/v3.rmfiles - git add . + git add -A if git commit -m "Update onesignal-vue3"; then echo "onesignal-vue3 repository has been updated" else From 77cc7a1fff2dd7ef1e3124fa151338e09fb47c00 Mon Sep 17 00:00:00 2001 From: Rodrigo Gomez Palacio Date: Thu, 31 Aug 2023 16:18:49 -0500 Subject: [PATCH 2/3] Switch to use latest known stable version https://github.com/ad-m/github-push-action/releases/tag/v0.6.0 This will prevent introducing upstream regressions --- .github/workflows/cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 35d099e..001eba5 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -48,7 +48,7 @@ jobs: echo "onesignal-ngx repository has NOT been updated, no changes to commit" fi - name: "[onesignal-ngx] Push" - uses: ad-m/github-push-action@master + uses: ad-m/github-push-action@v0.6.0 with: repository: OneSignal/onesignal-ngx directory: __clone/onesignal-ngx @@ -88,7 +88,7 @@ jobs: echo "react-onesignal repository has NOT been updated, no changes to commit" fi - name: "[react-onesignal] Push" - uses: ad-m/github-push-action@master + uses: ad-m/github-push-action@v0.6.0 with: repository: OneSignal/react-onesignal directory: __clone/react @@ -127,7 +127,7 @@ jobs: echo "onesignal-vue repository has NOT been updated, no changes to commit" fi - name: "[onesignal-vue] Push" - uses: ad-m/github-push-action@master + uses: ad-m/github-push-action@v0.6.0 with: repository: OneSignal/onesignal-vue directory: __clone/vue/v2 @@ -166,7 +166,7 @@ jobs: echo "onesignal-vue3 repository has NOT been updated, no changes to commit" fi - name: "[onesignal-vue3] Push" - uses: ad-m/github-push-action@master + uses: ad-m/github-push-action@v0.6.0 with: repository: OneSignal/onesignal-vue3 directory: __clone/vue/v3 From 0839c4dcb4fc86c9223cb4668cf4cc852514a83e Mon Sep 17 00:00:00 2001 From: Rodrigo Gomez Palacio Date: Thu, 31 Aug 2023 16:45:11 -0500 Subject: [PATCH 3/3] Remove use of .rmfiles After switching to commit all via `git add -A`, the diff should be handled automatically. --- .github/workflows/cd.yml | 4 ---- scripts/build | 7 ------- 2 files changed, 11 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 001eba5..e09da36 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -40,7 +40,6 @@ jobs: run: | tar zxvvf dist/onesignal-ngx.tgz -C __clone/ cd __clone/onesignal-ngx - while read file; do git rm "$file"; done < ../../build/onesignal-ngx.rmfiles git add -A if git commit -m "Update onesignal-ngx"; then echo "onesignal-ngx repository has been updated" @@ -80,7 +79,6 @@ jobs: run: | tar zxvvf dist/react.tgz -C __clone/ cd __clone/react - while read file; do git rm "$file"; done < ../../build/react.rmfiles git add -A if git commit -m "Update react-onesignal"; then echo "react-onesignal repository has been updated" @@ -119,7 +117,6 @@ jobs: run: | tar zxvvf dist/vue/v2.tgz -C __clone/ cd __clone/vue/v2 - while read file; do git rm "$file"; done < ../../build/vue/v2.rmfiles git add -A if git commit -m "Update onesignal-vue"; then echo "onesignal-vue repository has been updated" @@ -158,7 +155,6 @@ jobs: run: | tar zxvvf dist/vue/v3.tgz -C __clone/ cd __clone/vue/v3 - while read file; do git rm "$file"; done < ../../build/vue/v3.rmfiles git add -A if git commit -m "Update onesignal-vue3"; then echo "onesignal-vue3 repository has been updated" diff --git a/scripts/build b/scripts/build index c493b1e..ede9637 100755 --- a/scripts/build +++ b/scripts/build @@ -53,13 +53,6 @@ mv build/vue/v2.tgz dist/vue/v2.tgz mv build/vue/v3.tgz dist/vue/v3.tgz echo 'Done.' -echo 'Diff between current build and the content of the downstream repo.' -git diff --diff-filter=RD --name-status --no-index outputs/onesignal-ngx build/onesignal-ngx | cut -f 2 | perl -pe 's{outputs/[^/]+/}{}' >> build/onesignal-ngx.rmfiles || true -git diff --diff-filter=RD --name-status --no-index outputs/react build/react | cut -f 2 | perl -pe 's{outputs/[^/]+/}{}' >> build/react.rmfiles || true -git diff --diff-filter=RD --name-status --no-index outputs/vue/v2 build/vue/v2 | cut -f 2 | perl -pe 's{outputs/[^/]+/}{}' >> build/vue/v2.rmfiles || true -git diff --diff-filter=RD --name-status --no-index outputs/vue/v3 build/vue/v3 | cut -f 2 | perl -pe 's{outputs/[^/]+/}{}' >> build/vue/v3.rmfiles || true -echo 'Done.' - # This is required to use 'npm link' when testing local builds # We do this last so unneed files are not included in the releases. echo 'yarn init for local dev testing'