Skip to content

Commit afc6911

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

File tree

2 files changed

+553
-19
lines changed

2 files changed

+553
-19
lines changed

node/flatpak_node_generator/manifest.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,18 @@ 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,
166+
url: str,
167+
commit: Optional[str] = None,
168+
destination: Optional[Path] = None,
169+
tag: Optional[str] = None,
166170
) -> None:
167-
source = {'type': 'git', 'url': url, 'commit': commit}
171+
source = {'type': 'git', 'url': url}
172+
assert commit or tag
173+
if commit:
174+
source['commit'] = commit
175+
if tag:
176+
source['tag'] = tag
168177
self._add_source_with_destination(source, destination, is_dir=True)
169178

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

0 commit comments

Comments
 (0)