-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hannes Mühleisen
committed
Jun 3, 2024
1 parent
aad96da
commit 32ab121
Showing
3 changed files
with
32 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,21 @@ | ||
import os | ||
print(os.environ['ALL_CHANGED_FILES']) | ||
import yaml | ||
|
||
# TODO: check prefix, needs to be in installation dir | ||
|
||
desc_files = os.environ['ALL_CHANGED_FILES'].split(' ') | ||
if len(desc_files) != 1: | ||
raise ValueError('cannot have multiple descriptors changed or packages with spaces in their names') | ||
desc_file = desc_files[0] | ||
|
||
with open(desc_file, 'r') as stream: | ||
desc = yaml.safe_load(stream) | ||
|
||
print(desc) | ||
|
||
# todo check other stuff like build system etc. | ||
|
||
|
||
os.environ['COMMUNITY_EXTENSION_URL'] = desc['repo']['url'] | ||
os.environ['COMMUNITY_EXTENSION_REVISION'] = desc['repo']['revision'] | ||
os.environ['COMMUNITY_EXTENSION_NAME'] = desc['extension']['name'] |