Skip to content

Commit

Permalink
build(release): fix release script
Browse files Browse the repository at this point in the history
  • Loading branch information
JaDogg committed Jul 30, 2023
1 parent 6b31a83 commit c0ccebd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions compiler/scripts/release.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[main]
releases=["windows_x86_64", "linux_x86_64"]
releases=["windows-x86_64", "linux-x86_64"]
temp=comp_output_test
version=0.0.4

[windows_x86_64]
[windows-x86_64]
zig=https://ziglang.org/download/0.9.1/zig-windows-x86_64-0.9.1.zip
zig_sha256=443da53387d6ae8ba6bac4b3b90e9fef4ecbe545e1c5fa3a89485c36f5c0e3a2
zig_subfolder=zig-windows-x86_64-0.9.1
Expand All @@ -14,7 +14,7 @@ bin__ykreload=["bin/hammer.bin/ykreload-x86_64-windows-gnu.exe", "bin/Release/yk
bin__carpntr=["carpntr/build/carpntr-x86_64-windows-gnu.exe"]
bin__hammer=["hammer/build/hammer-x86_64-windows-gnu.exe"]

[linux_x86_64]
[linux-x86_64]
zig=https://ziglang.org/download/0.9.1/zig-linux-x86_64-0.9.1.tar.xz
zig_sha256=be8da632c1d3273f766b69244d80669fe4f5e27798654681d77c992f17c237d7
zig_subfolder=zig-linux-x86_64-0.9.1
Expand Down
7 changes: 5 additions & 2 deletions compiler/scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
PATHS = []

WINDOWS_OS = sys.platform.startswith('win')
CURRENT_PLATFORM_KEY = "windows_x86_64" if WINDOWS_OS else "linux_x86_64"
CURRENT_PLATFORM_KEY = "windows-x86_64" if WINDOWS_OS else "linux-x86_64"
BUNDLED_ZIG_VERSION = "0.9.1"
COMPILER_BINARIES = ["yaksha.exe", "yakshac.exe"] if WINDOWS_OS else ["yaksha", "yakshac"]
@contextmanager
Expand All @@ -23,6 +23,7 @@ def updated_path():
old_env = os.environ.copy()
sep: str = os.pathsep
path_var = old_env["PATH"] + sep + sep.join(PATHS)
print("$PATH = ", path_var)
os.environ.update({"PATH": path_var})
yield
os.environ.clear()
Expand Down Expand Up @@ -280,7 +281,9 @@ def extract_zig_for_compilation():
success, zig = download(sec.zig, sec.zig_sha256)
temp = make_directory(name + "_temp")
extract(zig, temp)
PATHS.append(os.path.join(temp, CURRENT_PLATFORM_KEY + "-" + BUNDLED_ZIG_VERSION))
PATHS.append(os.path.join(temp, "zig-" + CURRENT_PLATFORM_KEY + "-" + BUNDLED_ZIG_VERSION))
print(PATHS)
input("pause>")


def compile_carpntr():
Expand Down

0 comments on commit c0ccebd

Please sign in to comment.