Skip to content
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

Commit cbb9921

Browse files
author
Ron Netzer
committed
fix(utils): remove line break
1 parent 7a7caf9 commit cbb9921

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,20 @@ jobs:
169169
persist-credentials: false
170170
fetch-depth: 0
171171

172-
- name: Set git config
173-
run: git config --global hub.protocol https
172+
- name: Update git tags
173+
run: |
174+
git config --global hub.protocol https
175+
git config user.name e-square-ci
176+
git config user.email ci@e-square.io
177+
git remote set-url origin "https://x-access-token:$GITHUB_TOKEN@github.com/e-square-io/nx-github-actions.git"
178+
git remote set-url --push origin "https://x-access-token:$GITHUB_TOKEN@github.com/e-square-io/nx-github-actions.git"
179+
git tag -d v${{ needs.release.outputs.major }} || true
180+
git tag -d v${{ needs.release.outputs.major }}.${{ needs.release.outputs.minor }} || true
181+
git -f origin --delete v${{ needs.release.outputs.major }} || true
182+
git -f origin --delete v${{ needs.release.outputs.major }}.${{ needs.release.outputs.minor }} || true
183+
git tag -fa v${{ needs.release.outputs.major }} -m "Release v${{ needs.release.outputs.major }}"
184+
git tag -fa v${{ needs.release.outputs.major }}.${{ needs.release.outputs.minor }} -m "Release v${{ needs.release.outputs.major }}.${{ needs.release.outputs.minor }}"
185+
git push -f --follow-tags
174186
175187
- name: Obtain GitHub App Installation Access Token
176188
id: githubAppAuth
@@ -202,15 +214,16 @@ jobs:
202214
env:
203215
GITHUB_TOKEN: ${{ steps.githubAppAuth.outputs.token }}
204216
run: |
205-
git config user.name e-square-ci
206-
git config user.email ci@e-square.io
207217
git remote rm origin
208218
git remote add origin "https://x-access-token:$GITHUB_TOKEN@github.com/e-square-io/${{ matrix.package }}.git"
209219
git fetch
210220
git config main.remote origin
211221
git config main.merge refs/heads/main
212-
git pull origin main --rebase --allow-unrelated-histories
222+
git reset --hard origin/main
223+
git tag -d v${{ needs.release.outputs.major }} || true
224+
git tag -d v${{ needs.release.outputs.major }}.${{ needs.release.outputs.minor }} || true
213225
git push -f origin --delete v${{ needs.release.outputs.major }} || true
214226
git push -f origin --delete v${{ needs.release.outputs.major }}.${{ needs.release.outputs.minor }} || true
215-
git push -f --tags origin main v${{ needs.release.outputs.major }}
216-
git push -f --tags origin main v${{ needs.release.outputs.major }}.${{ needs.release.outputs.minor }}
227+
git tag -fa v${{ needs.release.outputs.major }} -m "Release v${{ needs.release.outputs.major }}"
228+
git tag -fa v${{ needs.release.outputs.major }}.${{ needs.release.outputs.minor }} -m "Release v${{ needs.release.outputs.major }}.${{ needs.release.outputs.minor }}"
229+
git push -f --follow-tags

packages/utils/src/lib/nx.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export type WorkspaceProjects = WorkspaceJsonConfiguration['projects'];
1717

1818
export function getWorkspaceProjects(): WorkspaceProjects {
1919
const workspaceFile = tree.exists('angular.json') ? 'angular.json' : 'workspace.json';
20-
2120
debug(`🐞 Found ${workspaceFile} as nx workspace`);
2221

2322
const workspaceContent: WorkspaceJsonConfiguration = JSON.parse(

0 commit comments

Comments
 (0)