Skip to content

Commit 2b5da93

Browse files
authored
chore(infra): clean build check will log recommended steps (#28044)
Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> When the CI process detects a diff between the output in CI after running `npm run build` versus the checked out branch, it will log the diff and exit. It isn't very clear to developers what they need to do or why this job step exists. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Logs a prettier error message to the developer to let them know the steps they can take when a diff is detected in CI ![CleanShot 2023-08-22 at 15 05 03](https://github.com/ionic-team/ionic-framework/assets/13732623/0397523e-5f4d-4ab6-8a2e-d9ecc4d085ba) Example run: https://github.com/ionic-team/ionic-framework/actions/runs/5942940488/job/16117074372?pr=28044 ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
1 parent e2be7fd commit 2b5da93

File tree

1 file changed

+10
-1
lines changed
  • .github/workflows/actions/test-core-clean-build

1 file changed

+10
-1
lines changed

.github/workflows/actions/test-core-clean-build/action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ runs:
1313
path: ./core
1414
filename: CoreBuild.zip
1515
- name: Check Diff
16-
run: git diff --exit-code
16+
run: |
17+
git diff --exit-code || {
18+
echo -e "\033[1;31m⚠️ Error: Differences Detected ⚠️\033[0m"
19+
echo -e "\033[1;31mThere are uncommitted changes between the build outputs from CI and your branch.\033[0m"
20+
echo -e "\033[1;31mPlease ensure you have followed these steps:\033[0m"
21+
echo -e "\033[1;31m1. Run 'npm run build' locally to generate the latest build output.\033[0m"
22+
echo -e "\033[1;31m2. Commit and push all necessary changes to your branch.\033[0m"
23+
echo -e "\033[1;31m3. Compare and validate the differences before proceeding.\033[0m"
24+
exit 1
25+
}
1726
shell: bash
1827
working-directory: ./core

0 commit comments

Comments
 (0)