Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
v2/examples/**/* linguist-documentation
setup.sh linguist-vendored
setup.ps1 linguist-vendored
v2/webui/**/* linguist-vendored
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: true
path: go-webui
- uses: maxim-lobanov/setup-xcode@v1
if: runner.os == 'macOS'
Expand All @@ -37,11 +36,10 @@ jobs:
mkdir $TEST_PROJECT && cd $TEST_PROJECT
go mod init $TEST_PROJECT && ls -lh
cp ../go-webui/examples/call_go_from_js.go ./main.go
- name: Setup WebUI library
run: |
cd $TEST_PROJECT
sh ../go-webui/setup.sh
sh ../go-webui/setup.sh # TODO: investigate why a second execution is required here.
# The WebUI C library ships inside the go-webui module (v2/webui subtree),
# so consuming the checkout is all the setup that is needed.
go mod edit -replace=github.com/webui-dev/go-webui/v2=../go-webui/v2
go mod tidy
- name: Build
run: |
cd $TEST_PROJECT
Expand All @@ -57,8 +55,6 @@ jobs:
TEST_PROJECT: 'go-webui-project'
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: maxim-lobanov/setup-xcode@v1
if: runner.os == 'macOS'
with:
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

46 changes: 18 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Logo](https://raw.githubusercontent.com/webui-dev/webui-logo/main/webui_go.png)

# Go-WebUI v2.5.1
# Go-WebUI v2.5.2

#### [Features](#features) · [Installation](#installation) · [Usage](#usage) · [Documentation](#documentation) · [WebUI](https://github.com/webui-dev/webui)

Expand Down Expand Up @@ -48,32 +48,15 @@
> [!NOTE]
> Until the next stable release it is recommended to use go-webui's latest development version.

- ### As Go module

> [!NOTE]
> Always verify what will be run before using either of these methods.

Run this command to get the latest `go-webui` module version, and to sync the WebUI C library that it is using.

```sh
go run github.com/webui-dev/go-webui/v2/sync-webui@main
```

Alternatively, use the `setup.sh` or `setup.bat` script to do the same thing.

- Windows
The WebUI C library is vendored into this repository at [`v2/webui/`](https://github.com/webui-dev/go-webui/tree/main/v2/webui) as a git subtree, so it ships with the Go module. There is no extra setup step and no submodule to initialize — a plain `go get` is enough.

```sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/webui-dev/go-webui/main/setup.bat)"
```

- Linux / macOS
- ### As Go module

```sh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/webui-dev/go-webui/main/setup.sh)"
go get github.com/webui-dev/go-webui/v2@main
```

- ### As submodule
- ### As git submodule of your project

The instructions below set up go-webui in a `modules` subdirectory of a go project.

Expand All @@ -92,24 +75,31 @@
```

```sh
git submodule update --init --filter=blob:none --recursive
git submodule update --init --filter=blob:none
```

`replace` the path accordingly in the `g.mod` file.
`replace` the path accordingly in the `go.mod` file.

```
require github.com/webui-dev/go-webui/v2 v2.5.1
require github.com/webui-dev/go-webui/v2 v2.5.2

replace github.com/webui-dev/go-webui/v2 v2.5.1 => ./modules/go-webui
replace github.com/webui-dev/go-webui/v2 v2.5.2 => ./modules/go-webui/v2
```

- ### As git clone - for development and contribution purposes

The command below retrieves go-webui as a lightweight, filtered clone.

```sh
git clone --recursive --shallow-submodules --filter=blob:none --also-filter-submodules \
https://github.com/webui-dev/go-webui.git
git clone --filter=blob:none https://github.com/webui-dev/go-webui.git
```

- ### Updating the vendored WebUI C library

Maintainers pull the latest WebUI nightly into the subtree with:

```sh
git subtree pull --prefix=v2/webui https://github.com/webui-dev/webui.git nightly --squash -m "Update WebUI to nightly"
```

## Usage
Expand Down
77 changes: 0 additions & 77 deletions setup.bat

This file was deleted.

50 changes: 0 additions & 50 deletions setup.sh

This file was deleted.

51 changes: 0 additions & 51 deletions v2/sync-webui/gotools.go

This file was deleted.

Loading
Loading