This repository has been archived by the owner on Jan 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- also moved py scripts out - improved readibility
- Loading branch information
1 parent
6e047b8
commit 90808ba
Showing
6 changed files
with
103 additions
and
36 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import subprocess as proc | ||
import argparse | ||
import os | ||
import sys | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument("-p", "--platform", type=str, default='any', choices=['win', 'mac', 'any']) | ||
parser.add_argument("-b", "--buildpath", type=str, required=True) | ||
|
||
args = parser.parse_args() | ||
|
||
platform = args.platform[:3].lower() | ||
|
||
cwd = os.getcwd() | ||
yak_exe_path = f'{cwd}\yak.exe' | ||
|
||
|
||
os.chdir(args.buildpath) | ||
print(f'moved to {os.getcwd()}') | ||
|
||
try: | ||
result = proc.run( [ yak_exe_path, 'build', '--platform', platform ] ) | ||
if (result.returncode == 1): | ||
print ('yak failed to build') | ||
finally: | ||
os.chdir(cwd) | ||
|
||
sys.exit(result.returncode) |
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,18 @@ | ||
import sys | ||
import os | ||
|
||
if os.path.isfile('yak.exe'): | ||
print('Yak is already downloaded. Using Cached version') | ||
sys.exit(0) | ||
|
||
try: | ||
import wget | ||
url = 'http://files.mcneel.com/yak/tools/latest/yak.exe' | ||
wget.download(url, 'yak.exe') | ||
|
||
sys.exit(0) | ||
|
||
except: | ||
import sys | ||
print ('failed to download yak from McNeel Servers') | ||
sys.exit(1) |
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,35 @@ | ||
import subprocess as proc | ||
from glob import glob | ||
import argparse | ||
import os | ||
import sys | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument("-p", "--publish", type=str, default=' ', choices=[None, 'test', 'production']) | ||
parser.add_argument("-b", "--buildpath", type=str, required=True) | ||
|
||
args = parser.parse_args() | ||
|
||
source = None | ||
if args.publish == 'test': | ||
source="https://test.yak.rhino3d.com" | ||
if args.publish == 'production': | ||
source="https://yak.rhino3d.com" | ||
|
||
if source == None: | ||
print ('Publish is None, exiting.') | ||
sys.exit(0) | ||
|
||
cwd = os.getcwd() | ||
yak_exe_path = f'{cwd}\yak.exe' | ||
|
||
yakPackages = glob(f'{args.buildpath}\*.yak') | ||
if yakPackages: | ||
for yakPackage in yakPackages: | ||
proc.run( [ yak_exe_path, 'push', yakPackage, '--source', source ] ) | ||
print (f'Published package {yakPackage} successfully to {source}') | ||
else: | ||
print (f'No Yak Packages found for given build path {args.buildpath}') | ||
sys.exit(1) | ||
|
||
sys.exit(0) |
Binary file not shown.