File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,15 @@ jobs:
3232 cd lifecycle_manager
3333 ./build_lifecycle_manager.sh
3434
35- # check if the zip file changed, if it did then the zip was rebuilt and we need to fail the build
36- # it should be checked in as part of the PR.
37- if git diff --name-only HEAD^ | grep -q 'lifecycle_manager/ec2-workerpool-lifecycle-manager.zip'; then
38- echo "Lifecycle Manager zip file has been modified, build failed."
39- exit 1
35+ # Check if rebuilding the zip creates any changes (indicating the committed zip is outdated)
36+ if git diff --exit-code -- ec2-workerpool-lifecycle-manager.zip; then
37+ echo "Lifecycle Manager zip file is up to date with main.py changes."
4038 else
41- echo "Lifecycle Manager zip file has not been modified, build succeeded."
39+ echo "ERROR: Lifecycle Manager zip file is not up to date!"
40+ echo "The zip file in the repository doesn't match what would be generated from the current main.py."
41+ echo "Please rebuild the zip file using './lifecycle_manager/build_lifecycle_manager.sh' and commit the updated zip."
42+ exit 1
4243 fi
4344 else
44- echo "Lifecycle Manager main.py has not been modified, skipping zip file check."
45+ echo "Lifecycle Manager main.py has not been modified, skipping zip file check."
4546 fi
You can’t perform that action at this time.
0 commit comments