Skip to content

Commit 80f86cf

Browse files
committed
I should not expect this to fail
1 parent 8999c95 commit 80f86cf

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

.github/workflows/rust-release.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ env:
2424
APPLE_CERTIFICATE_PASSWORD: codex-test-password
2525
# SHA-1 fingerprint of the test certificate; codesign accepts this format.
2626
APPLE_CODESIGN_IDENTITY: 4E7E4C6F30634C3C9E308723F109FE7C83C061ED
27-
CODESIGN_TEST: true
2827

2928
jobs:
3029
tag-check:
@@ -135,31 +134,39 @@ jobs:
135134
exit 1
136135
fi
137136
138-
cert_path="${RUNNER_TEMP}/apple_signing_certificate.p12"
139-
echo "$APPLE_CERTIFICATE" | base64 -d > "$cert_path"
137+
# TODO: we will be directly using the p12 from github secrets
138+
# cert_path="${RUNNER_TEMP}/apple_signing_certificate.p12"
139+
# echo "$APPLE_CERTIFICATE" | base64 -d > "$cert_path"
140140
141141
keychain_path="${RUNNER_TEMP}/codex-signing.keychain-db"
142142
security create-keychain -p "$KEYCHAIN_PASSWORD" "$keychain_path"
143143
security set-keychain-settings -lut 21600 "$keychain_path"
144144
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$keychain_path"
145145
146146
keychain_args=()
147+
147148
while IFS= read -r keychain; do
148149
[[ -n "$keychain" ]] && keychain_args+=("$keychain")
149150
done < <(security list-keychains | sed 's/^[[:space:]]*//;s/[[:space:]]*$//;s/"//g')
151+
150152
if ((${#keychain_args[@]} > 0)); then
151153
security list-keychains -s "$keychain_path" "${keychain_args[@]}"
152154
else
153155
security list-keychains -s "$keychain_path"
154156
fi
157+
155158
security default-keychain -s "$keychain_path"
156159
security import "$cert_path" -k "$keychain_path" -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign -T /usr/bin/security
157160
security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PASSWORD" "$keychain_path"
158161
159-
echo "::group::Imported signing identities"
160-
security find-identity -v -p codesigning "$keychain_path" || true
161-
security find-certificate -a -Z "$keychain_path" || true
162-
echo "::endgroup::"
162+
if [[ "${CODESIGN_DEBUG:-}" == "true" ]]; then
163+
echo "::group::Imported signing identities"
164+
# TODO: we will need to grab the identity from this and then use it in the next step
165+
# TODO: WE DEFINITELY NEED TO GET RID OF THOSE
166+
security find-identity -v -p codesigning "$keychain_path" || true
167+
security find-certificate -a -Z "$keychain_path" || true
168+
echo "::endgroup::"
169+
fi
163170
164171
rm -f "$cert_path"
165172
@@ -187,12 +194,7 @@ jobs:
187194
188195
for binary in codex codex-responses-api-proxy; do
189196
path="target/${{ matrix.target }}/release/${binary}"
190-
if [[ "${CODESIGN_TEST:-}" == "true" ]]; then
191-
echo "Ad-hoc signing $path (test mode)"
192-
codesign --force --sign - "$path"
193-
else
194-
codesign --force --options runtime --timestamp --sign "$APPLE_CODESIGN_IDENTITY" "${keychain_args[@]}" "$path"
195-
fi
197+
codesign --force --options runtime --timestamp --sign "$APPLE_CODESIGN_IDENTITY" "${keychain_args[@]}" "$path"
196198
codesign --verify --deep --strict "$path"
197199
done
198200

codex-rs/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)