Skip to content

Commit 27a7213

Browse files
committed
updates zig.get task
1 parent f735594 commit 27a7213

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

installer/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ end
66
defmodule Zig.Get.MixProject do
77
use Mix.Project
88

9-
@version "0.13.1"
9+
@version "0.14.0"
1010
@scm_url "https://github.com/e-xyza/zigler"
1111

1212
@elixir_requirement "~> 1.14"

installer/mix.tasks/zig.get.ex

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)