v2.0.0-beta.38 + release script

This commit is contained in:
Lea Anthony
2022-06-27 20:41:09 +10:00
parent f8e6fa4bf3
commit 66f79c2e51
63 changed files with 231 additions and 71 deletions
@@ -7,7 +7,7 @@ import (
"github.com/leaanthony/debme"
"github.com/leaanthony/gosod"
"github.com/wailsapp/wails/v2/cmd/wails/internal/commands/initialise/templates/generate/s"
"github.com/wailsapp/wails/v2/internal/s"
)
//go:embed assets/common/*
@@ -165,7 +165,11 @@ func main() {
}
// copy plain template
s.ECHO("Copying plain template")
s.RMDIR("../templates/plain")
s.COPYDIR("plain", "../templates/plain")
s.ECHO(`Until an auto fix is done, add "@babel/types": "^7.17.10" to vite-ts/frontend/package.json`)
}
func rebuildRuntime() {
@@ -224,6 +228,4 @@ func createTemplate(template *template) {
checkError(err)
s.CD(cwd)
s.ECHO(`Until an auto fix is done, add "@babel/types": "^7.17.10" to vite-ts/frontend/package.json`)
}
@@ -36,7 +36,7 @@ func main() {
Frameless: false,
StartHidden: false,
HideWindowOnClose: false,
BackgroundColour: &options.RGBA{R: 255, G: 255, B: 255, A: 255},
BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1},
Assets: assets,
Menu: nil,
Logger: nil,
@@ -14,7 +14,6 @@
"@vitejs/plugin-vue": "^2.3.3",
"typescript": "^4.5.4",
"vite": "^2.9.9",
"vue-tsc": "^0.34.7",
"@babel/types": "^7.17.10"
"vue-tsc": "^0.34.7"
}
}
+4 -1
View File
@@ -1,3 +1,6 @@
package internal
var Version = "v2.0.0-beta.37"
import _ "embed"
//go:embed version.txt
var Version string
+1
View File
@@ -0,0 +1 @@
v2.0.0-beta.38
+67
View File
@@ -0,0 +1,67 @@
package main
import (
"encoding/json"
"github.com/wailsapp/wails/v2/internal/s"
"os"
"os/exec"
"strconv"
"strings"
)
const versionFile = "../../cmd/wails/internal/version.txt"
func checkError(err error) {
if err != nil {
println(err.Error())
os.Exit(1)
}
}
func updateVersion() string {
currentVersionData, err := os.ReadFile(versionFile)
checkError(err)
currentVersion := string(currentVersionData)
vsplit := strings.Split(currentVersion, ".")
minorVersion, err := strconv.Atoi(vsplit[len(vsplit)-1])
checkError(err)
minorVersion++
vsplit[len(vsplit)-1] = strconv.Itoa(minorVersion)
newVersion := strings.Join(vsplit, ".")
err = os.WriteFile(versionFile, []byte(newVersion), 0755)
checkError(err)
return newVersion
}
func main() {
newVersion := updateVersion()
s.CD("../../../website")
s.ECHO("Generating new Docs for version: " + newVersion)
cmd := exec.Command("npm", "run", "docusaurus", "docs:version", newVersion)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err := cmd.Run()
checkError(err)
// Load the version list
versionsData, err := os.ReadFile("versions.json")
checkError(err)
var versions []string
err = json.Unmarshal(versionsData, &versions)
checkError(err)
oldestVersion := versions[len(versions)-1]
s.ECHO(oldestVersion)
versions = versions[0 : len(versions)-1]
newVersions, err := json.Marshal(&versions)
checkError(err)
err = os.WriteFile("versions.json", newVersions, 0755)
checkError(err)
s.ECHO("Removing old version: " + oldestVersion)
s.CD("versioned_docs")
s.RMDIR("version-" + oldestVersion)
s.CD("../versioned_sidebars")
s.RM("version-" + oldestVersion + "-sidebars.json")
}
@@ -1,8 +0,0 @@
# Surge
<p style={{"text-align": "center"}}>
<img src="/img/showcase/surge.png"></img><br/>
</p>
[Surge](https://surge.rule110.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source.
@@ -0,0 +1,11 @@
# October
<p style={{"text-align": "center"}}>
<img src="/img/showcase/october.png"></img><br/>
</p>
[October](https://october.utf9k.net) is a small Wails application that makes it really easy to extract highlights from [Kobo eReaders](https://en.wikipedia.org/wiki/Kobo_eReader) and then forward them to [Readwise](https://readwise.io).
It has a relatively small scope with all platform versions weighing in under 10MB, and that's without enabling [UPX compression](https://upx.github.io/)!
In contrast, the author's previous attempts with Electron quickly bloated to several hundred megabytes.
@@ -0,0 +1,8 @@
# Surge
<p style={{"text-align": "center"}}>
<img src="/img/showcase/surge.png"></img><br/>
</p>
[Surge](https://getsurge.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source.

Some files were not shown because too many files have changed in this diff Show More