|
15 | 15 |
|
16 | 16 | import requests |
17 | 17 |
|
18 | | -# make the dirs for putting the things in it |
| 18 | +# the date tag for the generated files and stuff |
19 | 19 | TAG = datetime.date.today().strftime("%Y%m%d") |
| 20 | +# the dirs for putting the things in it |
20 | 21 | BUILD_DIR = "_build" |
21 | | -BUILD_DEPS = "_build_deps" |
22 | | -BUILD_ZIPS = "_build_zips" |
| 22 | +BUILD_DEPS = os.path.join(BUILD_DIR, "deps") |
| 23 | +BUILD_RELEASE = os.path.join(BUILD_DIR, "release") |
| 24 | +# the bundle commone name and file |
23 | 25 | BUNDLE_NAME = "neradoc-keyboard-layouts" |
24 | | -BUNDLE_JSON = os.path.join(BUILD_DIR, f"{BUNDLE_NAME}-{TAG}.json") |
| 26 | +BUNDLE_JSON = os.path.join(BUILD_RELEASE, f"{BUNDLE_NAME}-{TAG}.json") |
25 | 27 | # platform dependent |
26 | 28 | BUNDLE_PATH_NAME = f"{BUNDLE_NAME}-{{platform}}-{TAG}" |
27 | 29 | BUNDLE_DIR = os.path.join(BUILD_DIR, BUNDLE_PATH_NAME) |
28 | | -BUNDLE_ZIP = os.path.join(BUILD_ZIPS, BUNDLE_PATH_NAME + ".zip") |
| 30 | +BUNDLE_ZIP = os.path.join(BUILD_RELEASE, BUNDLE_PATH_NAME + ".zip") |
29 | 31 | BUNDLE_LIB_DIR = os.path.join(BUNDLE_DIR, "lib") |
30 | 32 | # py platform directory |
31 | 33 | BUNDLE_REQ_DIR = os.path.join(BUNDLE_DIR.format(platform="py"), "requirements") |
@@ -89,8 +91,9 @@ def list_all_files(path): |
89 | 91 | def init_directories(): |
90 | 92 | """erase and create build directories""" |
91 | 93 | # create build directories |
| 94 | + os.makedirs(BUILD_DIR, exist_ok=True) |
92 | 95 | os.makedirs(BUILD_DEPS, exist_ok=True) |
93 | | - os.makedirs(BUILD_ZIPS, exist_ok=True) |
| 96 | + os.makedirs(BUILD_RELEASE, exist_ok=True) |
94 | 97 | os.makedirs(fmt(BUNDLE_DIR), exist_ok=True) |
95 | 98 |
|
96 | 99 | # cleanup build directories |
|
0 commit comments