mirror of
https://github.com/wavetermdev/wails.git
synced 2026-04-22 15:26:15 -07:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c129a35fb9 |
@@ -1,7 +1,7 @@
|
||||
name: Bug Report
|
||||
description: Create a report to help us improve
|
||||
# title: ""
|
||||
labels: ["Bug"]
|
||||
labels: ["bug"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Documentation
|
||||
description: Report an issue related to documentation.
|
||||
# title: ""
|
||||
labels: ["Documentation"]
|
||||
labels: ["documentation"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: Feature request
|
||||
description: Suggest an idea for this project
|
||||
# title: ""
|
||||
labels: ["Enhancement"]
|
||||
labels: ["enhancement"]
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: "master"
|
||||
submodules: true
|
||||
|
||||
@@ -6,10 +6,9 @@ on:
|
||||
jobs:
|
||||
docs:
|
||||
name: Website Updated
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v11.1
|
||||
|
||||
@@ -4,13 +4,14 @@ on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
update-sponsors:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set node
|
||||
uses: actions/setup-node@v2
|
||||
@@ -23,12 +24,10 @@ jobs:
|
||||
SPONSORKIT_GITHUB_TOKEN: ${{ secrets.SPONSORS_TOKEN }}
|
||||
SPONSORKIT_GITHUB_LOGIN: wailsapp
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
- name: Commit
|
||||
uses: EndBug/add-and-commit@v4
|
||||
with:
|
||||
commit-message: "chore: update sponsors.svg"
|
||||
add-paths: "website/static/img/sponsors.svg"
|
||||
title: Update Sponsor Image
|
||||
body: Generated new image
|
||||
branch: update-sponsors
|
||||
delete-branch: true
|
||||
message: "chore: update sponsors.svg"
|
||||
add: "website/static/img/sponsors.svg"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
name: 'issue-translator'
|
||||
on:
|
||||
issue_comment:
|
||||
types: [ created ]
|
||||
issues:
|
||||
types: [ opened ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
steps:
|
||||
- uses: tomsun28/issues-translate-action@v2.6
|
||||
with:
|
||||
IS_MODIFY_TITLE: false
|
||||
CUSTOM_BOT_NOTE: The issue body's language is not English, translating it automatically...
|
||||
@@ -7,7 +7,6 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: is-sponsor-label
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: JasonEtco/is-sponsor-label-action@v1
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
name: PR Checks
|
||||
on:
|
||||
pull_request:
|
||||
pull_request_review:
|
||||
types: [ submitted ]
|
||||
|
||||
jobs:
|
||||
check_branch_name:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
name: Check branch name
|
||||
steps:
|
||||
- run: |
|
||||
@@ -20,7 +17,7 @@ jobs:
|
||||
test:
|
||||
name: Run Go Tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: github.event.review.state == 'approved'
|
||||
needs: check_branch_name
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
@@ -28,7 +25,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install linux dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
name: Update Project
|
||||
|
||||
on:
|
||||
project_card:
|
||||
types: [ moved ]
|
||||
|
||||
jobs:
|
||||
projectcardautolabel_job:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
steps:
|
||||
- name: Run ProjectCard AutoLabel
|
||||
id: runprojectcardautolabel
|
||||
uses: Matticusau/projectcard-autolabel@v1.0.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
autolabel-config: '[{"column": "TODO", "add_labels":["TODO"], "remove_labels":["In Progress", "Ready For Testing"]},{"column":"In progress", "add_labels":["In Progress"], "remove_labels":["TODO", "Ready For Testing"]},{"column":"In review", "add_labels":["Ready For Testing"], "remove_labels":["TODO", "In Progress"]}, {"column":"Done", "add_labels":["Done"], "remove_labels":["TODO", "In Progress", "Ready For Testing"]}]'
|
||||
@@ -1,14 +1,15 @@
|
||||
name: Build + Test
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ release/*, master ]
|
||||
branches: [ release/* ]
|
||||
pull_request:
|
||||
branches: [ release/* ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run Go Tests
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -17,7 +18,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install linux dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
@@ -34,6 +35,7 @@ jobs:
|
||||
test_templates:
|
||||
name: Test Templates
|
||||
needs: test
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
@@ -43,7 +45,7 @@ jobs:
|
||||
go-version: [ 1.18, 1.19 ]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
name: Rebuild the runtime
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.17.6
|
||||
|
||||
@@ -115,7 +115,7 @@ This project is supported by these kind people / companies:
|
||||
|
||||
## Stargazers over time
|
||||
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
[](https://starchart.cc/wailsapp/wails)
|
||||
|
||||
## Contributors
|
||||
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@
|
||||
|
||||
## 星星增长趋势
|
||||
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
[](https://starchart.cc/wailsapp/wails)
|
||||
|
||||
## 贡献者
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package build
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/wailsapp/wails/v2/cmd/wails/internal"
|
||||
"github.com/wailsapp/wails/v2/internal/fs"
|
||||
"github.com/wailsapp/wails/v2/internal/gomod"
|
||||
"github.com/wailsapp/wails/v2/internal/goversion"
|
||||
"github.com/wailsapp/wails/v2/pkg/clilogger"
|
||||
"os"
|
||||
)
|
||||
|
||||
func SyncGoMod(logger *clilogger.CLILogger, updateWailsVersion bool) error {
|
||||
@@ -15,10 +15,7 @@ func SyncGoMod(logger *clilogger.CLILogger, updateWailsVersion bool) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
gomodFilename := fs.FindFileInParents(cwd, "go.mod")
|
||||
if gomodFilename == "" {
|
||||
return fmt.Errorf("no go.mod file found")
|
||||
}
|
||||
gomodFilename := filepath.Join(cwd, "go.mod")
|
||||
gomodData, err := os.ReadFile(gomodFilename)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -160,7 +160,6 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
}
|
||||
|
||||
buildOptions := generateBuildOptions(flags)
|
||||
buildOptions.SkipBindings = flags.skipBindings
|
||||
buildOptions.Logger = logger
|
||||
|
||||
userTags, err := buildtags.Parse(flags.tags)
|
||||
@@ -170,12 +169,7 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
|
||||
buildOptions.UserTags = userTags
|
||||
|
||||
err = build.CreateEmbedDirectories(cwd, buildOptions)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !buildOptions.SkipBindings {
|
||||
if !flags.skipBindings {
|
||||
if flags.verbosity == build.VERBOSE {
|
||||
LogGreen("Generating Bindings...")
|
||||
}
|
||||
@@ -198,6 +192,7 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
// Build the frontend if requested, but ignore building the application itself.
|
||||
ignoreFrontend := buildOptions.IgnoreFrontend
|
||||
if !ignoreFrontend {
|
||||
logger.Println("Building frontend for development...")
|
||||
buildOptions.IgnoreApplication = true
|
||||
if _, err := build.Build(buildOptions); err != nil {
|
||||
return err
|
||||
@@ -578,19 +573,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
case err := <-watcher.Errors:
|
||||
LogDarkYellow(err.Error())
|
||||
case item := <-watcher.Events:
|
||||
isEligibleFile := func(fileName string) bool {
|
||||
// Iterate all file patterns
|
||||
ext := filepath.Ext(fileName)
|
||||
if ext != "" {
|
||||
ext = ext[1:]
|
||||
if _, exists := extensionsThatTriggerARebuild[ext]; exists {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Handle write operations
|
||||
// Check for file writes
|
||||
if item.Op&fsnotify.Write == fsnotify.Write {
|
||||
// Ignore directories
|
||||
itemName := item.Name
|
||||
@@ -598,10 +581,15 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
continue
|
||||
}
|
||||
|
||||
if isEligibleFile(itemName) {
|
||||
rebuild = true
|
||||
timer.Reset(interval)
|
||||
continue
|
||||
// Iterate all file patterns
|
||||
ext := filepath.Ext(itemName)
|
||||
if ext != "" {
|
||||
ext = ext[1:]
|
||||
if _, exists := extensionsThatTriggerARebuild[ext]; exists {
|
||||
rebuild = true
|
||||
timer.Reset(interval)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
for _, reloadDir := range dirsThatTriggerAReload {
|
||||
@@ -617,8 +605,7 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
|
||||
timer.Reset(interval)
|
||||
}
|
||||
|
||||
// Handle new fs entries that are created
|
||||
// Check for new directories
|
||||
if item.Op&fsnotify.Create == fsnotify.Create {
|
||||
// If this is a folder, add it to our watch list
|
||||
if fs.DirExists(item.Name) {
|
||||
@@ -630,14 +617,6 @@ func doWatcherLoop(buildOptions *build.Options, debugBinaryProcess *process.Proc
|
||||
}
|
||||
LogGreen("Added new directory to watcher: %s", item.Name)
|
||||
}
|
||||
} else if isEligibleFile(item.Name) {
|
||||
// Handle creation of new file.
|
||||
// Note: On some platforms an update to a file is represented as
|
||||
// REMOVE -> CREATE instead of WRITE, so this is not only new files
|
||||
// but also updates to existing files
|
||||
rebuild = true
|
||||
timer.Reset(interval)
|
||||
continue
|
||||
}
|
||||
}
|
||||
case <-timer.C:
|
||||
|
||||
@@ -55,7 +55,6 @@ func main() {
|
||||
DisableWindowIcon: false,
|
||||
// DisableFramelessWindowDecorations: false,
|
||||
WebviewUserDataPath: "",
|
||||
ZoomFactor: 1.0,
|
||||
},
|
||||
// Mac platform specific options
|
||||
Mac: &mac.Options{
|
||||
|
||||
@@ -40,7 +40,7 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
|
||||
// For CI
|
||||
ciMode := false
|
||||
command.BoolFlag("ci", "CI Mode", &ciMode)
|
||||
command.BoolFlag("ci", "CI Mode", &ciMode).Hidden()
|
||||
|
||||
// Setup project directory
|
||||
projectDirectory := ""
|
||||
@@ -189,12 +189,6 @@ func initProject(options *templates.Options, quiet bool, ciMode bool) error {
|
||||
updateReplaceLine(workspace)
|
||||
}
|
||||
|
||||
// Remove the `.git`` directory in the template project
|
||||
err = os.RemoveAll(".git")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if options.InitGit {
|
||||
err = initGit(options)
|
||||
if err != nil {
|
||||
|
||||
@@ -56,8 +56,6 @@ func main() {
|
||||
DisableWindowIcon: false,
|
||||
// DisableFramelessWindowDecorations: false,
|
||||
WebviewUserDataPath: "",
|
||||
IsZoomControlEnabled: false,
|
||||
ZoomFactor: float64,
|
||||
},
|
||||
Mac: &mac.Options{
|
||||
TitleBar: &mac.TitleBar{
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.1.0
|
||||
v2.0.0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user