Skip to content

Commit d22a790

Browse files
committed
node: Add yarn2 support
1 parent ed05266 commit d22a790

File tree

2 files changed

+322
-19
lines changed

2 files changed

+322
-19
lines changed

node/flatpak_node_generator/manifest.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,14 @@ def add_data_source(self, data: Union[str, bytes], destination: Path) -> None:
162162
self._add_source_with_destination(source, destination, is_dir=False)
163163

164164
def add_git_source(
165-
self, url: str, commit: str, destination: Optional[Path] = None
165+
self, url: str, commit: Optional[str] = None, destination: Optional[Path] = None, tag: Optional[str] = None
166166
) -> None:
167-
source = {'type': 'git', 'url': url, 'commit': commit}
167+
source = {'type': 'git', 'url': url}
168+
assert commit or tag
169+
if commit:
170+
source['commit'] = commit
171+
if tag:
172+
source['tag'] = tag
168173
self._add_source_with_destination(source, destination, is_dir=True)
169174

170175
def add_script_source(self, commands: List[str], destination: Path) -> None:

0 commit comments

Comments
 (0)