跳到主要内容
版本:v2.0.0-rc.1

前沿风险技术

概述

Wails 一直在开发中,新版本会定期“标记”。 这通常发生在master分支上所有较新的代码都经过测试并确认有效时。 如果您需要尚未发布的错误修复或功能,可以通过以下步骤使用最新的“前沿风险”版本:

  • git clone https://github.com/wailsapp/wails
  • cd wails/v2/cmd/wails
  • go install

注意:您将项目克隆到的目录现在将被称为“clonedir”。

Wails CLI 现在将是最新版本。

Updating your project

To update projects to use the latest version of the Wails library, update the project's go.mod and ensure the following line is at the bottom of the file:

replace github.com/wailsapp/wails/v2 => <clonedir>

示例:

在 Windows 上: replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2

在'nix 上: replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2

To revert to a stable version, run:

go install github.com/wailsapp/wails/v2/cmd/wails@latest

测试一个分支

如果要测试一个分支,请按照上面的说明进行操作,但请确保在安装之前切换要测试的分支:

  • git clone https://github.com/wailsapp/wails
  • cd wails
  • git checkout -b branch-to-test --track origin/branch-to-test
  • cd v2/cmd/wails
  • go install

Make sure you update your project as described above.

Testing a PR

If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace [IDofThePR] with the ID of the PR shown on github.com: If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace [IDofThePR] with the ID of the PR shown on github.com: Please replace [IDofThePR] with the ID of the PR shown on github.com:

  • git clone https://github.com/wailsapp/wails
  • cd wails
  • git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR]
  • git checkout test/pr-[IDofThePR]
  • git reset --hard HEAD
  • cd v2/cmd/wails
  • go install

Make sure you update your project as described above.