Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
go-reproducer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
go-reproducer
Commits
985e0c64
Commit
985e0c64
authored
2 years ago
by
akwizgran
Browse files
Options
Downloads
Patches
Plain Diff
Don't clobber built jar when downloading reference jar.
parent
b6d31c37
No related branches found
No related tags found
1 merge request
!11
Simplify zip paths, update Go and NDK
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build-binary.py
+5
-6
5 additions, 6 deletions
build-binary.py
utils.py
+7
-7
7 additions, 7 deletions
utils.py
verify-binary.py
+3
-3
3 additions, 3 deletions
verify-binary.py
with
15 additions
and
16 deletions
build-binary.py
+
5
−
6
View file @
985e0c64
...
...
@@ -3,8 +3,8 @@ import os, shutil
from
glob
import
glob
from
subprocess
import
check_call
from
utils
import
get_build_versions
,
ex
,
get_sha256
,
zip_files
,
get_final_file_
name
,
\
get_sources_file_
name
,
get_pom_file_
name
,
reset_time
,
get_version_number
,
check_go_version
,
\
from
utils
import
get_build_versions
,
ex
,
get_sha256
,
zip_files
,
get_final_file_
path
,
\
get_sources_file_
path
,
get_pom_file_
path
,
reset_time
,
get_version_number
,
check_go_version
,
\
get_version_and_tool
,
get_output_dir
,
get_platform_output_dir
,
GO_PATH
,
GO_ROOT
,
NDK_DIR
...
...
@@ -193,7 +193,7 @@ def package_windows(tool, versions):
def
package
(
tool
,
versions
,
file_list
,
platform
):
zip_file
=
get_final_file_
name
(
tool
,
versions
,
platform
)
zip_file
=
get_final_file_
path
(
tool
,
versions
,
platform
)
zip_files
(
file_list
,
zip_file
,
versions
)
create_sources_jar
(
tool
,
versions
,
platform
)
create_pom_file
(
tool
,
versions
,
platform
)
...
...
@@ -215,19 +215,18 @@ def create_sources_jar(tool, versions, platform):
for
file
in
glob
(
os
.
path
.
join
(
repo_dir
,
'
*
'
)):
reset_time
(
file
,
versions
)
jar_files
.
append
(
os
.
path
.
relpath
(
file
,
repo_dir
))
jar_path
=
get_sources_file_
name
(
tool
,
versions
,
platform
)
jar_path
=
get_sources_file_
path
(
tool
,
versions
,
platform
)
check_call
([
'
jar
'
,
'
cf
'
,
jar_path
]
+
jar_files
,
cwd
=
repo_dir
)
def
create_pom_file
(
tool
,
versions
,
platform
):
tool_version
=
get_version_number
(
versions
)
pom_file
=
get_pom_file_
name
(
tool
,
versions
,
platform
)
pom_file
=
get_pom_file_
path
(
tool
,
versions
,
platform
)
template
=
'
template-%s-%s.pom
'
%
(
tool
,
platform
)
with
open
(
template
,
'
rt
'
)
as
infile
:
with
open
(
pom_file
,
'
wt
'
)
as
outfile
:
for
line
in
infile
:
outfile
.
write
(
line
.
replace
(
'
VERSION
'
,
tool_version
))
return
pom_file
if
__name__
==
"
__main__
"
:
...
...
This diff is collapsed.
Click to expand it.
utils.py
+
7
−
7
View file @
985e0c64
...
...
@@ -76,23 +76,23 @@ def get_version_number(versions):
return
versions
[
'
tag
'
]
def
get_output_file
(
tool
,
versions
,
platform
,
suffix
):
def
get_output_file
_path
(
tool
,
versions
,
platform
,
suffix
):
output_dir
=
get_platform_output_dir
(
tool
,
platform
)
version
=
get_version_number
(
versions
)
filename
=
'
%s-%s-%s%s
'
%
(
tool
,
platform
,
version
,
suffix
)
return
os
.
path
.
join
(
output_dir
,
filename
)
def
get_final_file_
name
(
tool
,
versions
,
platform
):
return
get_output_file
(
tool
,
versions
,
platform
,
'
.jar
'
)
def
get_final_file_
path
(
tool
,
versions
,
platform
):
return
get_output_file
_path
(
tool
,
versions
,
platform
,
'
.jar
'
)
def
get_sources_file_
name
(
tool
,
versions
,
platform
):
return
get_output_file
(
tool
,
versions
,
platform
,
'
-sources.jar
'
)
def
get_sources_file_
path
(
tool
,
versions
,
platform
):
return
get_output_file
_path
(
tool
,
versions
,
platform
,
'
-sources.jar
'
)
def
get_pom_file_
name
(
tool
,
versions
,
platform
):
return
get_output_file
(
tool
,
versions
,
platform
,
'
.pom
'
)
def
get_pom_file_
path
(
tool
,
versions
,
platform
):
return
get_output_file
_path
(
tool
,
versions
,
platform
,
'
.pom
'
)
def
get_output_dir
(
tool
):
...
...
This diff is collapsed.
Click to expand it.
verify-binary.py
+
3
−
3
View file @
985e0c64
...
...
@@ -3,7 +3,7 @@ import os
import
sys
from
subprocess
import
check_call
,
CalledProcessError
from
utils
import
get_sha256
,
fail
,
get_build_versions
,
get_final_file_
name
,
\
from
utils
import
get_sha256
,
fail
,
get_build_versions
,
get_final_file_
path
,
\
get_version_and_tool
,
get_version_number
...
...
@@ -25,7 +25,7 @@ def verify(tool, command_line_version, platform):
tool_version
,
versions
=
get_build_versions
(
tool
,
command_line_version
)
# download reference binary
file_name
=
get_final_file_
name
(
tool
,
versions
,
platform
)
file_name
=
os
.
path
.
basename
(
get_final_file_
path
(
tool
,
versions
,
platform
)
)
os
.
makedirs
(
'
reference
'
,
exist_ok
=
True
)
reference_file_name
=
os
.
path
.
join
(
'
reference
'
,
file_name
)
# try downloading from maven central
...
...
@@ -58,7 +58,7 @@ def verify(tool, command_line_version, platform):
def
get_url
(
tool
,
versions
,
platform
):
version
=
get_version_number
(
versions
)
directory
=
"
%s-%s
"
%
(
tool
,
platform
)
file
=
get_final_file_
name
(
tool
,
versions
,
platform
)
file
=
os
.
path
.
basename
(
get_final_file_
path
(
tool
,
versions
,
platform
)
)
return
"
https://repo.maven.apache.org/maven2/org/briarproject/%s/%s/%s
"
%
(
directory
,
version
,
file
)
...
...
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