@@ -18,14 +18,16 @@ defmodule Mix.Tasks.Zig.Get do
1818
1919 @ shortdoc "Obtains the Zig compiler toolchain"
2020
21+ @ default_version "0.14.0"
22+
2123 @ moduledoc """
2224 obtains the Zig compiler toolchain
2325
24- $ mix zig.get [--version VERSION] [--from FROM] [--os OS] [--arch ARCH]
26+ $ mix zig.get [--version VERSION] [--from FROM] [--os OS] [--arch ARCH] [other options]
2527
2628 the zigler compiler will be downloaded to ZIG_ARCHIVE_PATH/VERSION
2729
28- if unspecified, VERSION defaults to the major/minor version of zig.get
30+ if unspecified, VERSION defaults to #{ @ default_version } .
2931
3032 if FROM is specified, will use the FROM file instead of getting from the internet.
3133
@@ -39,9 +41,13 @@ defmodule Mix.Tasks.Zig.Get do
3941
4042 - `TAR_COMMAND`: path to a tar executable that is equivalent to gnu tar.
4143 only useful for non-windows architectures.
42- - `NO_VERIFY`: disable signature verification of the downloaded file.
43- Not recommended.
4444 - `ZIG_ARCHIVE_PATH`: path to desired directory to achive the zig compiler toolchain.
45+
46+ ### other options
47+
48+ - `--force` overwrites the existing installation if it exists.
49+ - `--disable-verify` disables the hash verification of the downloaded file.
50+ it's possible that the manifest at `https://ziglang.org/download/index.json`
4551 """
4652
4753 defstruct ~w( version path arch os url file verify hash force) a
@@ -97,8 +103,6 @@ defmodule Mix.Tasks.Zig.Get do
97103 end
98104 end
99105
100- @ default_version "0.13.0"
101-
102106 defp defaults do
103107 { os , arch } = Zig.Get . os_info ( )
104108
0 commit comments