Skip to content

Commit

Permalink
update installation guide
Browse files Browse the repository at this point in the history
  • Loading branch information
xhd2015 committed Apr 5, 2024
1 parent 2ff0c18 commit af6a487
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 42 deletions.
22 changes: 3 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,7 @@ See [Quick Start](#quick-start) and [Documentation](./doc) for more details.

# Installation
```sh
# macOS and Linux (and WSL)
curl -fsSL https://github.com/xhd2015/xgo/raw/master/install.sh | bash

# Windows
powershell -c "irm github.com/xhd2015/xgo/raw/master/install.ps1|iex"
```

If you've already installed `xgo`, you can upgrade it with:

```sh
xgo upgrade
```

If you want to build from source, run with:

```sh
git clone https://github.com/xhd2015/xgo
cd xgo
go run ./script/build-release --local
go install github.com/xhd2015/xgo/cmd/xgo@latest
```

Verify the installation:
Expand All @@ -51,6 +33,8 @@ xgo version
# 1.0.x
```

There are other options,see [doc/INSTALLATION.md](./doc/INSTALLATION.md).

# Requirement
`xgo` requires at least `go1.17` to compile.

Expand Down
22 changes: 3 additions & 19 deletions README_zh_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,7 @@

# 安装
```sh
# macOS和Linux(包括 WSL)
curl -fsSL https://github.com/xhd2015/xgo/raw/master/install.sh | bash

# Windows
powershell -c "irm github.com/xhd2015/xgo/raw/master/install.ps1|iex"
```

如果你已经安装了`xgo`, 可以通过下面的命令进行升级:

```sh
xgo upgrade
```

如果你想使用最新的版本或者本地构建, 可以使用下面的命令:

```sh
git clone https://github.com/xhd2015/xgo
cd xgo
go run ./script/build-release --local
go install github.com/xhd2015/xgo/cmd/xgo@latest
```

验证:
Expand All @@ -50,6 +32,8 @@ xgo version
# 1.0.x
```

更多安装方式, 参考[doc/INSTALLATION.md](./doc/INSTALLATION.md).

# 使用须知
`xgo` 需要`go1.17`及以上的版本。

Expand Down
4 changes: 2 additions & 2 deletions cmd/xgo/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import "fmt"

const VERSION = "1.0.18"
const REVISION = "1223dc619d8076d507f3bd4e2acf923b772729b4+1"
const NUMBER = 160
const REVISION = "f0cc411faaf6a9b12a4140f32e02b5f3c461a91d+1"
const NUMBER = 161

func getRevision() string {
revSuffix := ""
Expand Down
25 changes: 25 additions & 0 deletions doc/INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Install Prebuilt Binaries
Install prebuilt:
```sh
# macOS and Linux (and WSL)
curl -fsSL https://github.com/xhd2015/xgo/raw/master/install.sh | bash

# Windows
powershell -c "irm github.com/xhd2015/xgo/raw/master/install.ps1|iex"
```

# Upgrade if you've already installed
If you've already installed `xgo`, you can upgrade it with:

```sh
xgo upgrade
```

# Build from source
If you want to build from source, run with:

```sh
git clone https://github.com/xhd2015/xgo
cd xgo
go run ./script/build-release --local
```
4 changes: 2 additions & 2 deletions runtime/core/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
)

const VERSION = "1.0.18"
const REVISION = "1223dc619d8076d507f3bd4e2acf923b772729b4+1"
const NUMBER = 160
const REVISION = "f0cc411faaf6a9b12a4140f32e02b5f3c461a91d+1"
const NUMBER = 161

// these fields will be filled by compiler
const XGO_VERSION = ""
Expand Down

0 comments on commit af6a487

Please sign in to comment.