Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask-vpn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julian Merlin
bitmask-vpn
Commits
d9131ae8
Unverified
Commit
d9131ae8
authored
3 years ago
by
Kali Kaneko
Browse files
Options
Downloads
Patches
Plain Diff
[pkg] add stub for stapler script
parent
10644a69
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
branding/scripts/osx-stapler.sh
+53
-0
53 additions, 0 deletions
branding/scripts/osx-stapler.sh
with
53 additions
and
0 deletions
branding/scripts/osx-stapler.sh
0 → 100644
+
53
−
0
View file @
d9131ae8
#!/bin/bash
# Notes to script notarization steps.
# Taken from https://oozou.com/blog/scripting-notarization-for-macos-app-distribution-38
# TODO: put pass in keychain
# 1. create dmb
hdiutil create
-format
UDZO
-srcfolder
yourFolder YourApp.dmg
# 2. send notarization request
requestInfo
=
$(
xcrun altool
--notarize-app
\
--file
"YourApp.dmg"
\
--username
"yourDeveloperAccountEmail@email.com"
\
--password
"@keychain:notarization-password"
\
--asc-provider
"yourAppleTeamID"
\
--primary-bundle-id
"com.your.app.bundle.id"
)
current_status
=
"in progress"
while
[[
"
$currentStatus
"
==
"in progress"
]]
;
do
sleep
15
statusResponse
=
$(
xcrun altool
--notarization-info
"
$uuid
"
\
--username
"yourDeveloperAccountEmail@email.com"
\
--password
"@keychain:notarization-password"
)
# TODO change to python ---- ruby script ------------------------------------
# the response is a multiline string, with the status being on its own line
# using the format "Status: <status here>"
# Split each line into its own object in an array
response_objects
=
ARGV[0].split
(
"
\n
"
)
# get line that contains the "Status:" text
status_line
=
response_objects.select
{
|data| data.include?
(
'Status:'
)
}[
0]
# get text describing the status (should be either "in progress" or "success")
current_status
=
"#{status_line.split('Status: ').last}"
# respond with value
puts current_status
# -- end ruby script --------------------------------------------------------
current_status
=
$(
ruby status.rb
"
$statusResponse
"
)
done
if
[[
"
$current_status
"
==
"success"
]]
;
then
# staple notarization here
xcrun stapler staple
"YourApp.dmg"
else
echo
"Error! The status was
$current_status
. There were errors. Please check the LogFileURL for error descriptions"
exit
1
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment