-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tools - Add a VS Code task to just build a given addon (#10756)
* Add a VS Code task to just build the given addon * Automatically get current addon
- Loading branch information
1 parent
77a9519
commit 95834b2
Showing
2 changed files
with
43 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
Author: DartRuffian | ||
Builds the current addon, intended to be executed from a VS Code task | ||
""" | ||
|
||
import sys | ||
import os | ||
|
||
def main() -> None: | ||
filepath = sys.argv[1] | ||
if not (filepath.startswith("addons")): | ||
sys.exit(os.system(f"echo Failed to build: {filepath} is not an addon path")) | ||
|
||
addon = filepath.split("\\")[1] | ||
os.system(f"echo Building addon: {addon}") | ||
os.system(f"hemtt build --just {addon}") | ||
|
||
if __name__ == "__main__": | ||
main() |