|
70 | 70 | |
71 | 71 | echo "Testing IPA contents:" |
72 | 72 | unzip -l ./ipa/Feather.ipa || echo "Failed to list IPA contents" |
73 | | - |
74 | | - echo "Creating test directory:" |
75 | | - mkdir -p test_unzip |
76 | | - |
77 | | - echo "Attempting to unzip IPA:" |
78 | | - unzip -o ./ipa/Feather.ipa -d test_unzip || echo "Failed to unzip IPA" |
79 | | - |
80 | | - echo "Test directory contents:" |
81 | | - ls -la test_unzip |
82 | 73 |
|
83 | 74 | # Verify IPA Structure |
84 | 75 | - name: Verify IPA Structure |
@@ -111,55 +102,42 @@ jobs: |
111 | 102 | # Sign the IPA with error handling |
112 | 103 | - name: Sign IPA |
113 | 104 | run: | |
114 | | - # Verify certificates and files |
115 | | - echo "Checking required files:" |
116 | | - if [ ! -f "./Cert/Distribution.p12" ]; then |
117 | | - echo "Error: Distribution.p12 is missing!" |
118 | | - exit 1 |
119 | | - fi |
120 | | - if [ ! -f "./Cert/Distribution.mobileprovision" ]; then |
121 | | - echo "Error: Distribution.mobileprovision is missing!" |
122 | | - exit 1 |
123 | | - fi |
124 | | - if [ ! -f "./ipa/Feather.ipa" ]; then |
125 | | - echo "Error: Feather.ipa is missing!" |
126 | | - exit 1 |
127 | | - fi |
128 | | - |
129 | | - echo "File permissions and sizes:" |
130 | | - ls -lh ./Cert/Distribution.p12 |
131 | | - ls -lh ./Cert/Distribution.mobileprovision |
132 | | - ls -lh ./ipa/Feather.ipa |
| 105 | + # Verify files exist |
| 106 | + echo "Checking required files..." |
| 107 | + ls -la ./Cert/Distribution.p12 |
| 108 | + ls -la ./Cert/Distribution.mobileprovision |
| 109 | + ls -la ./ipa/Feather.ipa |
133 | 110 | |
134 | 111 | # Create signed directory |
135 | 112 | mkdir -p signed |
136 | 113 | |
137 | | - # Run zsign with verbose output |
| 114 | + # Run zsign with proper flags |
138 | 115 | echo "Running zsign..." |
139 | | - set -x # Enable command tracing |
140 | | - zsign -v -k ./Cert/Distribution.p12 -p "1234" -m ./Cert/Distribution.mobileprovision -o ./signed/Feather-signed.ipa ./ipa/Feather.ipa || { |
141 | | - echo "zsign failed with error code $?" |
142 | | - # Check temp directory |
143 | | - echo "Temp directory contents:" |
144 | | - ls -la /tmp/zsign_folder_* || echo "No temp folder found" |
145 | | - # Check if IPA can be unzipped |
146 | | - echo "Testing IPA file:" |
147 | | - unzip -l ./ipa/Feather.ipa || echo "IPA file might be corrupted" |
148 | | - exit 1 |
| 116 | + zsign \ |
| 117 | + -f \ # Force sign without cache |
| 118 | + -k ./Cert/Distribution.p12 \ |
| 119 | + -p 1234 \ |
| 120 | + -m ./Cert/Distribution.mobileprovision \ |
| 121 | + -o ./signed/Feather-signed.ipa \ |
| 122 | + -z 9 \ # Maximum compression |
| 123 | + -v \ # Verbose output |
| 124 | + ./ipa/Feather.ipa || { |
| 125 | + echo "zsign failed with error code $?" |
| 126 | + echo "Temp directory contents:" |
| 127 | + ls -la /tmp/zsign_folder_* || echo "No temp folder found" |
| 128 | + exit 1 |
149 | 129 | } |
150 | 130 | |
151 | | - # Verify signed IPA |
| 131 | + # Verify signed IPA was created |
152 | 132 | if [ ! -f "./signed/Feather-signed.ipa" ]; then |
153 | 133 | echo "Signed IPA was not created!" |
154 | | - # Check signed directory |
155 | 134 | echo "Signed directory contents:" |
156 | 135 | ls -la ./signed/ |
157 | 136 | exit 1 |
| 137 | + else |
| 138 | + echo "Signed IPA created successfully:" |
| 139 | + ls -lh ./signed/Feather-signed.ipa |
158 | 140 | fi |
159 | | - |
160 | | - # Verify signed IPA size |
161 | | - echo "Signed IPA details:" |
162 | | - ls -lh ./signed/Feather-signed.ipa || echo "Failed to list signed IPA" |
163 | 141 |
|
164 | 142 | # Debug directory contents |
165 | 143 | - name: List directory contents |
|
0 commit comments