Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tor-reproducer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
briar
tor-reproducer
Commits
c5c496e4
Verified
Commit
c5c496e4
authored
2 years ago
by
Sebastian
Browse files
Options
Downloads
Patches
Plain Diff
Use create_sources_jar() from utils.py for macOS
parent
a115b134
No related branches found
No related tags found
1 merge request
!30
Use create_sources_jar() from utils.py for macOS
Pipeline
#14879
passed with warnings
2 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
upstream/build_tor_macos.py
+2
-25
2 additions, 25 deletions
upstream/build_tor_macos.py
with
2 additions
and
25 deletions
upstream/build_tor_macos.py
+
2
−
25
View file @
c5c496e4
...
...
@@ -5,7 +5,7 @@ from subprocess import check_call
import
hashlib
import
utils
from
utils
import
get_version
,
get_build_versions
,
reset_time
,
\
from
utils
import
get_version
,
get_build_versions
,
reset_time
,
create_sources_jar
\
get_sources_file_name
,
get_output_dir
,
get_sha256
,
pack
,
create_pom_file
from
pathlib
import
Path
import
tarfile
...
...
@@ -34,7 +34,7 @@ def setup():
check_call
([
'
git
'
,
'
submodule
'
,
'
update
'
],
cwd
=
Path
(
BUILD_DIR
))
# create sources jar before building
jar_name
=
create_sources_jar
(
versions
)
jar_name
=
create_sources_jar
(
versions
,
PLATFORM
)
return
versions
,
jar_name
...
...
@@ -95,29 +95,6 @@ def package_macos(versions, jar_name):
sha256hash
=
get_sha256
(
file
)
print
(
"
%s: %s
"
%
(
file
,
sha256hash
))
def
create_sources_jar
(
versions
):
output_dir
=
get_output_dir
(
PLATFORM
)
jar_files
=
[]
for
root
,
dir_names
,
filenames
in
os
.
walk
(
BUILD_DIR
):
for
f
in
filenames
:
if
'
/.git
'
in
root
:
continue
jar_files
.
append
(
os
.
path
.
join
(
root
,
f
))
for
file
in
jar_files
:
reset_time
(
file
,
versions
)
jar_name
=
get_sources_file_name
(
versions
,
PLATFORM
)
jar_path
=
os
.
path
.
abspath
(
jar_name
)
rel_paths
=
[
os
.
path
.
relpath
(
f
,
BUILD_DIR
)
for
f
in
sorted
(
jar_files
)]
# create jar archive with first files
jar_step
=
5000
check_call
([
'
jar
'
,
'
cf
'
,
jar_path
]
+
rel_paths
[
0
:
jar_step
],
cwd
=
BUILD_DIR
)
# add subsequent files in steps, because the command line can't handle all at once
for
i
in
range
(
jar_step
,
len
(
rel_paths
),
jar_step
):
check_call
([
'
jar
'
,
'
uf
'
,
jar_path
]
+
rel_paths
[
i
:
i
+
jar_step
],
cwd
=
BUILD_DIR
)
return
jar_name
def
compare_output_with_upstream
(
versions
):
compare_with_upstream
(
versions
,
"
aarch64
"
)
compare_with_upstream
(
versions
,
"
x86_64
"
)
...
...
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