Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: chrome/installer/mac/sign_installer_tools.sh

Issue 2832073002: Refactor mac signing scripts for development workflow (Closed)
Patch Set: Fix wrong requirement variable name Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/mac/sign_app.sh.in ('k') | chrome/installer/mac/sign_versioned_dir.sh.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/mac/sign_installer_tools.sh
diff --git a/chrome/installer/mac/sign_installer_tools.sh b/chrome/installer/mac/sign_installer_tools.sh
index 4b0834d466465ec62d39af88452d03c4504859b6..3fa50e113e3bc3f1c5f4a98852b3cdaf70d1d1f7 100755
--- a/chrome/installer/mac/sign_installer_tools.sh
+++ b/chrome/installer/mac/sign_installer_tools.sh
@@ -22,16 +22,23 @@ export -n SHELLOPTS
ME="$(basename "${0}")"
readonly ME
-if [[ ${#} -ne 3 ]]; then
- echo "usage: ${ME} packaging_dir codesign_keychain codesign_id" >& 2
+if [[ ${#} -ne 3 && ${#} -ne 4 ]]; then
+ echo "usage: ${ME} packaging_dir codesign_keychain codesign_id \
+[--development]" >& 2
exit 1
fi
packaging_dir="${1}"
codesign_keychain="${2}"
codesign_id="${3}"
+is_development=
-enforcement_flags="restrict,library-validation,kill"
+if [[ ${#} == 4 && ${4} == "--development" ]]; then
+ is_development=1
+fi
+
+script_dir="$(dirname "${0}")"
+source "${script_dir}/variables.sh"
executables=(goobspatch xzdec)
libraries=(liblzma_decompress.dylib)
@@ -41,8 +48,18 @@ for executable in "${executables[@]}"; do
sign_path="${packaging_dir}/${executable}"
everything+=("${sign_path}")
- codesign --sign "${codesign_id}" --keychain "${codesign_keychain}" \
- "${sign_path}" --options "${enforcement_flags}"
+ codesign_cmd=(
+ codesign --sign "${codesign_id}" --keychain "${codesign_keychain}"
+ "${sign_path}" --options "${enforcement_flags_installer_tools}"
+ )
+
+ if [[ -z "${is_development}" ]]; then
+ requirement="designated => identifier \"${executable}\" \
+${requirement_suffix}"
+ codesign_cmd+=( -r="${requirement}" )
+ fi
+
+ "${codesign_cmd[@]}"
done
for library in "${libraries[@]}"; do
« no previous file with comments | « chrome/installer/mac/sign_app.sh.in ('k') | chrome/installer/mac/sign_versioned_dir.sh.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698