File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,23 @@ def _swift_package_impl(repository_ctx):
83
83
# Remove unused modulemaps to prevent module redefinition errors
84
84
repo_rules .remove_modulemaps (repository_ctx , directory , pkg_ctx .pkg_info .targets )
85
85
86
+ has_repo_metadata = hasattr (repository_ctx , "repo_metadata" )
87
+ if has_repo_metadata and repository_ctx .attr .commit :
88
+ return repository_ctx .repo_metadata (reproducible = True )
89
+
86
90
# Return attributes that make this reproducible
87
- return _update_git_attrs (repository_ctx .attr , _ALL_ATTRS .keys (), update )
91
+ attrs_for_reproducibility = _update_git_attrs (
92
+ repository_ctx .attr ,
93
+ _ALL_ATTRS .keys (),
94
+ update ,
95
+ )
96
+
97
+ if has_repo_metadata :
98
+ return repository_ctx .repo_metadata (
99
+ attrs_for_reproducibility = attrs_for_reproducibility ,
100
+ )
101
+ else :
102
+ return attrs_for_reproducibility
88
103
89
104
_GIT_ATTRS = {
90
105
"branch" : attr .string (
You can’t perform that action at this time.
0 commit comments