Skip to content

Commit d00c62d

Browse files
committed
put the builds in the same directory and release sub directory
1 parent f343e33 commit d00c62d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

build.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,19 @@
1515

1616
import requests
1717

18-
# make the dirs for putting the things in it
18+
# the date tag for the generated files and stuff
1919
TAG = datetime.date.today().strftime("%Y%m%d")
20+
# the dirs for putting the things in it
2021
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
2325
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")
2527
# platform dependent
2628
BUNDLE_PATH_NAME = f"{BUNDLE_NAME}-{{platform}}-{TAG}"
2729
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")
2931
BUNDLE_LIB_DIR = os.path.join(BUNDLE_DIR, "lib")
3032
# py platform directory
3133
BUNDLE_REQ_DIR = os.path.join(BUNDLE_DIR.format(platform="py"), "requirements")
@@ -89,8 +91,9 @@ def list_all_files(path):
8991
def init_directories():
9092
"""erase and create build directories"""
9193
# create build directories
94+
os.makedirs(BUILD_DIR, exist_ok=True)
9295
os.makedirs(BUILD_DEPS, exist_ok=True)
93-
os.makedirs(BUILD_ZIPS, exist_ok=True)
96+
os.makedirs(BUILD_RELEASE, exist_ok=True)
9497
os.makedirs(fmt(BUNDLE_DIR), exist_ok=True)
9598

9699
# cleanup build directories

0 commit comments

Comments
 (0)