Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
234 commits
Select commit Hold shift + click to select a range
c10b2fe
reset --stdin: trim carriage return from the paths
Apr 5, 2017
9008d33
gvfs: start by adding the -gvfs suffix to the version
sanoursa Jan 24, 2017
7d85dff
status: add status serialization mechanism
jeffhostetler Aug 22, 2017
43250d6
Teach ahead-behind and serialized status to play nicely together
jamill Jan 10, 2018
57e1cd9
status: serialize to path
jeffhostetler Feb 2, 2018
f587d20
gvfs: add global command pre and post hook procs
May 24, 2016
d3b031c
status: reject deserialize in V2 and conflicts
jeffhostetler Feb 7, 2018
783ad10
gvfs:trace2:data: add trace2 tracing around read_object_process
jeffhostetler Sep 26, 2018
a14d840
gvfs: ensure that the version is based on a GVFS tag
dscho Apr 4, 2017
7794cbf
t0400: verify that the hook is called correctly from a subdirectory
dscho Mar 16, 2017
8716386
status: fix rename reporting when using serialization cache
jeffhostetler Jul 25, 2018
ec71cde
gvfs:trace2:data: status deserialization information
jeffhostetler Sep 26, 2018
8a0a38e
gvfs: add a GVFS-specific header file
Jan 24, 2017
5913efa
Pass PID of git process to hooks.
alepauly Apr 10, 2017
6147f6f
serialize-status: serialize global and repo-local exclude file metadata
jeffhostetler Jul 20, 2018
bbebe4f
gvfs:trace2:data: status serialization
jeffhostetler Jan 7, 2019
b9480b5
gvfs: add the core.gvfs config setting
Jan 24, 2017
d24f0af
pre-command: always respect core.hooksPath
dscho Aug 7, 2017
7a6f3b2
status: deserialization wait
jeffhostetler Jul 25, 2018
14f917c
gvfs:trace2:data: add vfs stats
jeffhostetler Nov 19, 2018
212d2ff
gvfs: add the feature to skip writing the index' SHA-1
Jan 24, 2017
a545a89
sparse-checkout: update files with a modify/delete conflict
Feb 22, 2017
82d5d78
merge-recursive: avoid confusing logic in was_dirty()
dscho May 21, 2019
d1c8b3a
trace2: refactor setting process starting time
jeffhostetler Apr 15, 2019
0e93fb4
gvfs: add the feature that blobs may be missing
Jan 24, 2017
044d9fd
sparse-checkout: avoid writing entries with the skip-worktree bit
Mar 1, 2017
25ef587
merge-recursive: add some defensive coding to was_dirty()
dscho May 21, 2019
b747955
trace2:gvfs:experiment: clear_ce_flags_1
jeffhostetler Apr 30, 2019
e3cdd6b
gvfs: prevent files to be deleted outside the sparse checkout
May 18, 2016
6b8a074
Fix reset when using the sparse-checkout feature.
Mar 15, 2017
275e549
merge-recursive: teach was_dirty() about the virtualfilesystem
dscho May 21, 2019
e7d9a18
trace2:gvfs:experiment: report_tracking
jeffhostetler Apr 30, 2019
efb2771
gvfs: optionally skip reachability checks/upload pack during fetch
May 30, 2016
fd5e627
Do not remove files outside the sparse-checkout
Apr 5, 2017
cfea3bb
Add virtual file system settings and hook proc
benpeart Jan 11, 2018
4292c72
status: deserialize with -uno does not print correct hint
jeffhostetler Jun 25, 2019
ccf2ce5
trace2:gvfs:experiment: read_cache: annotate thread usage in read-cache
jeffhostetler Jun 14, 2019
113cb12
gvfs: ensure all filters and EOL conversions are blocked
Jun 15, 2016
32324f2
gvfs: refactor loading the core.gvfs config value
Apr 14, 2017
2bc1e53
Update the virtualfilesystem support
benpeart Jun 7, 2018
2d6458b
wt-status-deserialize: fix crash when -v is used
jeffhostetler Apr 10, 2020
66bcd45
trace2:gvfs:experiment: read-cache: time read/write of cache-tree ext…
jeffhostetler Jul 9, 2019
ef73875
Add a new run_hook_strvec() function
dscho Nov 30, 2016
1ac2caa
send-pack: do not check for sha1 file when GVFS_MISSING_OK set
Nov 16, 2018
d69bd0b
virtualfilesystem: don't run the virtual file system hook if the inde…
benpeart Aug 1, 2018
c5af110
fsmonitor: check CE_FSMONITOR_VALID in ce_uptodate
kewillford Nov 21, 2019
60c3ee6
cache-tree: use `r` instead of `the_repository` in Trace2
jeffhostetler Jun 3, 2019
0fec91c
gvfs: allow "virtualizing" objects
Jan 10, 2017
c315007
cache-tree: remove use of strbuf_addf in update_one
Jul 3, 2017
81f0bd5
virtualfilesystem: fix bug with symlinks being ignored
benpeart Sep 25, 2018
d656e94
fsmonitor: add script for debugging and update script for tests
kewillford Nov 21, 2019
4d9c8ac
trace2:gvfs:experiment: add region to apply_virtualfilesystem()
jeffhostetler Jul 16, 2019
e2e44f6
Hydrate missing loose objects in check_and_freshen()
Mar 15, 2017
babf5e7
gvfs: block unsupported commands when running in a GVFS repo
benpeart Dec 6, 2018
95f3217
virtualfilesystem: check if directory is included
Oct 9, 2018
5aabd28
status: disable deserialize when verbose output requested.
jeffhostetler Apr 11, 2020
da7ea1f
trace2:gvfs:experiment: add region around unpack_trees()
jeffhostetler Jul 16, 2019
2d27bef
Add support for read-object as a background process to retrieve missi…
Jul 18, 2017
41a841e
gvfs: allow overriding core.gvfs
derrickstolee Apr 15, 2020
7495c9e
vfs: fix case where directories not handled correctly
jamill Nov 20, 2018
d283cf3
t7524: add test for verbose status deserialzation
jeffhostetler Apr 11, 2020
fb7bd30
trace2:gvfs:experiment: add region to cache_tree_fully_valid()
jeffhostetler Jul 16, 2019
a203316
sha1_file: when writing objects, skip the read_object_hook
dscho Sep 8, 2017
7efb232
BRANCHES.md: Add explanation of branches and using forks
Jul 27, 2018
c4bc864
backwards-compatibility: support the post-indexchanged hook
dscho May 28, 2019
bd1ec28
deserialize-status: silently fallback if we cannot read cache file
jeffhostetler May 13, 2020
6c364aa
credential: set trace2_child_class for credential manager children
jeffhostetler Oct 3, 2019
bf11180
sub-process: do not borrow cmd pointer from caller
jeffhostetler Sep 18, 2019
9e889c6
sub-process: add subprocess_start_argv()
jeffhostetler Sep 18, 2019
28da815
sha1-file: add function to update existing loose object cache
jeffhostetler Sep 24, 2019
b1a113d
packfile: add install_packed_git_and_mru()
jeffhostetler Sep 25, 2019
fa95838
index-pack: avoid immediate object fetch while parsing packfile
jeffhostetler Sep 24, 2019
5c4fb0b
gvfs-helper: create tool to fetch objects using the GVFS Protocol
jeffhostetler Aug 13, 2019
99b784a
gvfs-helper: fix race condition when creating loose object dirs
derrickstolee Oct 4, 2019
ccfe63a
sha1-file: create shared-cache directory if it doesn't exist
jeffhostetler Oct 7, 2019
925975a
gvfs-helper: better handling of network errors
jeffhostetler Oct 8, 2019
709ca1a
gvfs-helper-client: properly update loose cache with fetched OID
jeffhostetler Oct 8, 2019
f4f0d63
gvfs-helper: V2 robust retry and throttling
jeffhostetler Oct 10, 2019
a7c21d5
gvfs-helper: expose gvfs/objects GET and POST semantics
jeffhostetler Oct 21, 2019
c825594
gvfs-helper: dramatically reduce progress noise
derrickstolee Oct 24, 2019
b863130
gvfs-helper: add prefetch support
jeffhostetler Nov 11, 2019
d1bbc7c
gvfs-helper-client.h: define struct object_id
derrickstolee Nov 4, 2019
5bee1dc
gvfs-helper: add prefetch .keep file for last packfile
jeffhostetler Nov 26, 2019
8d6e8a3
gvfs-helper: handle pack-file after single POST request
derrickstolee Nov 11, 2019
409f5fe
gvfs-helper: do one read in my_copy_fd_len_tail()
derrickstolee Dec 16, 2019
4d46d34
test-gvfs-prococol, t5799: tests for gvfs-helper
jeffhostetler Oct 25, 2019
0f5c440
gvfs-helper: move content-type warning for prefetch packs
derrickstolee Dec 16, 2019
5773899
gvfs-helper: move result-list construction into install functions
jeffhostetler Nov 13, 2019
5c5df17
trace2:gvfs:experiment: add unpack_entry() counter to unpack_trees() …
jeffhostetler Jul 16, 2019
ca327cf
Merge core VFS features
dscho Jun 11, 2018
b7f0209
fetch: use gvfs-helper prefetch under config
derrickstolee Dec 17, 2019
21aa81c
t5799: add support for POST to return either a loose object or packfile
jeffhostetler Nov 13, 2019
79af3d0
trace2:gvfs:experiment: increase default event depth for unpack-tree …
jeffhostetler Jul 25, 2019
3153537
Merge advanced VFS-specific features
dscho Jun 11, 2018
105d5e3
gvfs-helper: better support for concurrent packfile fetches
jeffhostetler Dec 18, 2019
1e5e071
t5799: cleanup wc-l and grep-c lines
jeffhostetler Nov 13, 2019
7903fc4
trace2:gvfs:experiment: add data for check_updates() in unpack_trees()
jeffhostetler Jul 25, 2019
2288811
Merge virtualfilesystem hook
dscho Jun 11, 2018
627b418
remote-curl: do not call fetch-pack when using gvfs-helper
derrickstolee Feb 3, 2020
4d915c9
gvfs-helper: verify loose objects after write
derrickstolee Sep 18, 2020
1691c79
Trace2:gvfs:experiment: capture more 'tracking' details
jeffhostetler Jul 26, 2019
1b8ce67
Merge updates to serialized status
dscho Jun 11, 2018
d1812aa
fetch: reprepare packs before checking connectivity
derrickstolee Mar 12, 2020
d241c5f
t7599: create corrupt blob test
jeffhostetler Sep 18, 2020
d030032
Merge trace2 experimental regions
jeffhostetler Apr 23, 2019
52c4948
gvfs-helper: retry when creating temp files
derrickstolee Dec 26, 2019
b013f94
Merge first wave of gvfs-helper feature
jeffhostetler Nov 14, 2019
7ca32a5
update-microsoft-git: create barebones builtin
derrickstolee Apr 29, 2021
186b63d
homebrew: add GitHub workflow to release Cask
mjcheetham Jul 24, 2020
35cde78
upload-pack: fix race condition in error messages
derrickstolee Aug 27, 2019
cadf2b5
Merge gvfs-helper prefetch feature
derrickstolee Dec 17, 2019
f60cfc6
update-microsoft-git: Windows implementation
derrickstolee Apr 29, 2021
08096ce
maintenance: care about gvfs.sharedCache config
derrickstolee Dec 15, 2020
94ccc0f
Merge upstreamable patches
dscho Oct 18, 2018
6256dec
unpack-trees:virtualfilesystem: Improve efficiency of clear_ce_flags
neerajsi-msft2 Feb 6, 2021
2b74bbb
Adding winget workflows
Apr 29, 2021
6393c8b
update-microsoft-git: use brew on macOS
derrickstolee Apr 29, 2021
921bcb8
Adding readme for microsoft/git
May 4, 2021
cf3798b
Merge pull request #301: Update 'git maintenance' to match upstream
derrickstolee Dec 15, 2020
440525d
Merge pull request #315: unpack-trees:virtualfilesystem: Improve effi…
derrickstolee Feb 16, 2021
91e1e3c
Implement `scalar diagnose`
dscho Apr 16, 2021
9164d6b
Merge pull request #328: Adding winget workflow
derrickstolee Apr 30, 2021
e41061d
scalar register: set recommended config settings
derrickstolee Apr 12, 2021
ae3298d
scalar: implement the `clone` subcommand
dscho Apr 12, 2021
018cd88
scalar diagnose: include disk space information
dscho Apr 22, 2021
8b10671
scalar: start documenting the command
dscho May 3, 2021
77c5dfe
Merge pull request #329: Add `git update-microsoft-git`
derrickstolee Apr 30, 2021
7eefafc
scalar register/unregister: start/stop maintenance on repository
derrickstolee Apr 12, 2021
1d3cff3
scalar: test `scalar clone`
dscho Apr 14, 2021
aee3f62
scalar: allow reconfiguring an existing enlistment
dscho May 27, 2021
354d454
scalar: teach `diagnose` to gather packfile info
mjcheetham May 19, 2021
b098a09
scalar: document the `clone` subcommand
dscho Apr 27, 2021
05ef60f
Merge pull request #333: update microsoft/git README
derrickstolee May 17, 2021
7b896d1
maintenance: create `launchctl` configuration using a lock file
dscho May 21, 2021
18ee232
Start porting `scalar.exe` to C
dscho Apr 10, 2021
c0af1b6
scalar: implement 'scalar list'
derrickstolee Apr 12, 2021
d7b7bfc
scalar clone: suppress warning about `init.defaultBranch`
dscho Apr 14, 2021
f4317dd
scalar reconfigure: optionally handle all registered enlistments
dscho May 27, 2021
57be57a
scalar: teach `diagnose` to gather loose objs info
mjcheetham May 19, 2021
9368cbf
scalar: enable built-in FSMonitor on `register`
mjcheetham May 19, 2021
7b23cf0
scalar: document `list`, `register` and `unregister`
dscho Apr 27, 2021
807eed5
git_config_set_multivar_in_file_gently(): add a lock timeout
dscho May 18, 2021
4f0f6e9
ci: run Scalar's Functional Tests
dscho Jun 8, 2021
8082d04
t1092: mark passing test as success
derrickstolee May 28, 2021
8464b82
maintenance: skip bootout/bootstrap when plist is registered
derrickstolee May 21, 2021
13d82ec
scalar: add a test script
dscho Apr 14, 2021
d14cc6d
scalar unregister: handle deleted enlistment directory gracefully
dscho May 14, 2021
a52a3b7
scalar clone: respect --single-branch
dscho Apr 16, 2021
3430f62
scalar: implement the `run` command
derrickstolee Apr 14, 2021
1bb016d
scalar: support the `config` command for backwards compatibility
dscho May 27, 2021
dfc5774
scalar diagnose: show a spinner while staging content
dscho Apr 28, 2021
4e15821
scalar: implement the `delete` command
mjcheetham May 12, 2021
c6de7ef
scalar: implement the `version` command
dscho May 10, 2021
6000b08
scalar: accept -C and -c options before the subcommand
dscho Apr 29, 2021
5379a34
scalar unregister: stop FSMonitor daemon
dscho Apr 22, 2021
2bc882c
scalar: document the remaining subcommands
dscho May 3, 2021
d9fa398
scalar: set the config write-lock timeout to 150ms
dscho May 18, 2021
7271479
Merge pull request #371 from dscho/run-scalar-functional-tests-and-fi…
dscho Jun 9, 2021
0013372
Merge pull request #358: maintenance: skip bootout/bootstrap when pli…
derrickstolee May 21, 2021
54d59b6
Merge branch 'barebones-scalar'
dscho May 3, 2021
6af94c8
Merge branch 'scalar-register-unregister-list'
dscho May 3, 2021
9ec6f61
scalar: implement a minimal JSON parser
dscho Apr 26, 2021
07a4105
Merge branch 'scalar-clone'
dscho May 3, 2021
413d183
scalar clone: support GVFS-enabled remote repositories
dscho Apr 16, 2021
a177fbb
Merge branch 'scalar-run'
dscho May 3, 2021
82e799c
test-gvfs-protocol: also serve smart protocol
dscho Apr 16, 2021
4a5dfbf
Merge branch 'scalar-reconfigure'
dscho Jun 1, 2021
45cf8d7
gvfs-helper: add the `endpoint` command
dscho Apr 26, 2021
9c30306
Merge branch 'scalar-diagnose'
dscho May 3, 2021
86b3106
dir_inside_of(): handle directory separators correctly
dscho May 14, 2021
70d98d0
Merge branch 'scalar-delete'
dscho May 19, 2021
5bff0ac
scalar: disable authentication in unattended mode
dscho May 6, 2021
fb9f4f0
Merge branch 'scalar-version'
dscho May 21, 2021
5fc4977
scalar: do initialize `gvfs.sharedCache`
dscho May 3, 2021
a746451
Merge branch 'scalar-c-and-C'
dscho May 3, 2021
3c830cb
scalar diagnose: include shared cache info
dscho Jun 1, 2021
f231d0f
git help: special-case `scalar`
dscho May 4, 2021
5166771
Merge branch 'scalar-and-builtin-fsmonitor'
dscho May 3, 2021
f66c73f
scalar: only try GVFS protocol on https:// URLs
dscho Apr 28, 2021
00ad7ac
scalar: implement the `help` subcommand
dscho May 18, 2021
30f1ad0
Merge branch 'scalar-docs'
dscho May 3, 2021
47f5e3d
scalar: verify that we can use a GVFS-enabled repository
dscho Apr 16, 2021
9344672
NOT-TO-UPSTREAM: ci: build `scalar.exe`, too
dscho Apr 14, 2021
af1535a
Optionally include `scalar` when building/testing Git
dscho May 4, 2021
4e2e1c4
Merge branch 'scalar-gentler-config-locking'
dscho May 19, 2021
18a0787
scalar: add the `cache-server` command
dscho Apr 23, 2021
4e0ddc9
ci(windows): also run `scalar` tests
dscho Apr 14, 2021
f5ada08
Merge branch 'include-scalar-in-build'
dscho May 4, 2021
5c5eccd
scalar: add a test toggle to skip accessing the vsts/info endpoint
dscho May 12, 2021
bc3a765
Merge branch 'scalar-ci'
dscho May 3, 2021
ae795fd
Merge branch 'scalar-with-gvfs'
dscho May 3, 2021
dda9652
ci: run Scalar functional tests for PRs against features/*
derrickstolee Jun 9, 2021
da65d42
Merge pull request #366 from dscho/features/scalar-2.32.0
dscho Jun 9, 2021
b89d380
scalar: use microsoft/scalar:main for tests
derrickstolee Jun 16, 2021
1c74931
Merge pull request #372: ci: run Scalar functional tests for PRs agai…
derrickstolee Jun 10, 2021
2f6565c
scalar: add retry logic to run_git()
derrickstolee Jun 17, 2021
ab42168
scalar: add docs from microsoft/scalar
derrickstolee Jun 16, 2021
60e6b64
Merge pull request #376: scalar: use microsoft/scalar:main for tests
derrickstolee Jun 17, 2021
521a7f3
scalar: only retry a full clone if not using GVFS protocol
derrickstolee Jun 17, 2021
8f3ebdc
Merge pull request #377: Update README to include Scalar CLI details
derrickstolee Jun 17, 2021
8ea0db8
gvfs: disable the built-in FSMonitor
dscho Jun 18, 2021
2dddf82
git-rebase.txt: correct antiquated claims about --rebase-merges
newren Aug 1, 2021
eb3b25e
directory-rename-detection.txt: small updates due to merge-ort optimi…
newren Aug 1, 2021
aabae1c
Documentation: edit awkward references to `git merge-recursive`
newren Aug 1, 2021
6d75e85
merge-strategies.txt: update wording for the resolve strategy
newren Aug 1, 2021
d4d57ba
merge-strategies.txt: do not imply using copy detection is desired
newren Aug 1, 2021
0978f54
Merge pull request #378: Scalar: Fix some flaky tests with retry logi…
derrickstolee Jun 18, 2021
c0803c0
merge-strategies.txt: avoid giving special preference to patience alg…
newren Aug 1, 2021
55818b1
release: create initial Windows installer build workflow
vdye Jul 16, 2021
88c6b40
Update winget manifest
Jun 18, 2021
8868048
Merge pull request #379 from dscho/disable-fsmonitor-with-gvfs
dscho Jun 18, 2021
b20ebe9
merge-strategies.txt: fix simple capitalization error
newren Aug 1, 2021
0acbf8a
release: add Mac OSX installer build
vdye Jul 16, 2021
9eebae7
Add workflow for apt-get release
dscho Jun 25, 2021
71e7e93
Merge pull request #380 from ldennington/update-winget-manifest
Jun 19, 2021
656e23c
git-rebase.txt: correct out-of-date and misleading text about renames
newren Aug 1, 2021
6e865b5
release: build unsigned Ubuntu .deb package
vdye Jul 16, 2021
7310da5
Add instructions for `apt-get` install to `README`
Jul 1, 2021
c2a298e
add/rm: allow adding sparse entries when virtual
derrickstolee Jun 29, 2021
9411662
Merge pull request #386 from ldennington/add-release-apt-get-workflow
Jun 28, 2021
ef8fa51
merge-strategies.txt: add coverage of the `ort` merge strategy
newren Aug 1, 2021
547bea3
release: add signing step for .deb package
vdye Jul 16, 2021
2ee85fc
Clarify `workflow_dispatch` input description
ldennington Jul 1, 2021
85049d2
Merge pull request #392: add: allow adding sparse entries when virtual
derrickstolee Jul 1, 2021
dab1c0d
Update error message and code comment
newren Aug 3, 2021
d76fbf5
release: create draft GitHub release with packages & installers
vdye Jul 16, 2021
78c6e9b
Merge pull request #393 from ldennington/update-linux
Jul 2, 2021
9cbb481
Change default merge backend from recursive to ort
newren Mar 6, 2021
7f67712
Merge pull request #399 from vdye/feature/build-installers
vdye Jul 29, 2021
68d5610
Update docs for change of default merge backend
newren Jul 22, 2021
61a4750
Makefile: disable cURL warnings on gvfs-helper.c
derrickstolee Aug 3, 2021
8c587d7
Merge pull request #404: Make 'ort' the default merge strategy
derrickstolee Aug 4, 2021
322ee20
sparse-index: fix crash in status
jeffhostetler Jul 2, 2021
24f9d5c
merge-ort: ignore skip-worktree bit with virtual filesystem
derrickstolee Aug 17, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions .github/scripts/sign-debian-packages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
import json
import os
import glob
import pprint
import subprocess
import sys

esrp_tool = os.path.join("esrp", "tools", "EsrpClient.exe")

AAD_ID = "38aa33bc-a7e7-4007-bfb2-e8b17f04aadc"
WORKSPACE = os.environ['GITHUB_WORKSPACE'].strip()
ARTIFACTS_DIR = os.environ['ARTIFACTS_DIR'].strip()

def main():
source_root_location = os.path.join(WORKSPACE, ARTIFACTS_DIR, "unsigned")
destination_location = os.path.join(WORKSPACE, ARTIFACTS_DIR)

files = glob.glob(os.path.join(source_root_location, "*.deb"))

print("Found files:")
pprint.pp(files)

if len(files) < 1 or not files[0].endswith(".deb"):
print("Error: cannot find .deb to sign")
exit(1)

file_to_sign = os.path.basename(files[0])

auth_json = {
"Version": "1.0.0",
"AuthenticationType": "AAD_CERT",
"TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"ClientId": AAD_ID,
"AuthCert": {
"SubjectName": f"CN={AAD_ID}.microsoft.com",
"StoreLocation": "LocalMachine",
"StoreName": "My",
},
"RequestSigningCert": {
"SubjectName": f"CN={AAD_ID}",
"StoreLocation": "LocalMachine",
"StoreName": "My",
}
}

input_json = {
"Version": "1.0.0",
"SignBatches": [
{
"SourceLocationType": "UNC",
"SourceRootDirectory": source_root_location,
"DestinationLocationType": "UNC",
"DestinationRootDirectory": destination_location,
"SignRequestFiles": [
{
"CustomerCorrelationId": "01A7F55F-6CDD-4123-B255-77E6F212CDAD",
"SourceLocation": file_to_sign,
"DestinationLocation": os.path.join("signed", file_to_sign),
}
],
"SigningInfo": {
"Operations": [
{
"KeyCode": "CP-450779-Pgp",
"OperationCode": "LinuxSign",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0",
}
]
}
}
]
}

policy_json = {
"Version": "1.0.0",
"Intent": "production release",
"ContentType": "Debian package",
}

configs = [
("auth.json", auth_json),
("input.json", input_json),
("policy.json", policy_json),
]

for filename, data in configs:
with open(filename, 'w') as fp:
json.dump(data, fp)

# Run ESRP Client
esrp_out = "esrp_out.json"
result = subprocess.run(
[esrp_tool, "sign",
"-a", "auth.json",
"-i", "input.json",
"-p", "policy.json",
"-o", esrp_out,
"-l", "Verbose"],
cwd=WORKSPACE)

if result.returncode != 0:
print("Failed to run ESRPClient.exe")
sys.exit(1)

if os.path.isfile(esrp_out):
print("ESRP output json:")
with open(esrp_out, 'r') as fp:
pprint.pp(json.load(fp))

signed_file = os.path.join(destination_location, "signed", file_to_sign)
if os.path.isfile(signed_file):
print(f"Success!\nSigned {signed_file}")

if __name__ == "__main__":
main()
Loading