5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 23:39:21 +08:00

Misc linting fixes and version bump

This commit is contained in:
Lea Anthony 2019-03-03 11:34:00 +11:00
parent 587681bb8d
commit 8553f43080
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
6 changed files with 7 additions and 3 deletions

View File

@ -41,6 +41,8 @@ func (fs *FSHelper) FileExists(path string) bool {
return fi.Mode().IsRegular() return fi.Mode().IsRegular()
} }
// CreateFile creates a file at the given filename location with the contents
// set to the given data. It will create intermediary directories if needed.
func (fs *FSHelper) CreateFile(filename string, data []byte) error { func (fs *FSHelper) CreateFile(filename string, data []byte) error {
// Ensure directory exists // Ensure directory exists
fs.MkDirs(filepath.Dir(filename)) fs.MkDirs(filepath.Dir(filename))

View File

@ -174,7 +174,7 @@ func CheckWindres() (err error) {
} }
programHelper := NewProgramHelper() programHelper := NewProgramHelper()
if !programHelper.IsInstalled("windres") { if !programHelper.IsInstalled("windres") {
return fmt.Errorf("windres not installed. It comes by default with mingw. Ensure you have installed mingw correctly.") return fmt.Errorf("windres not installed. It comes by default with mingw. Ensure you have installed mingw correctly")
} }
return nil return nil
} }

View File

@ -17,6 +17,7 @@ func NewLogger() *Logger {
return &Logger{errorOnly: false} return &Logger{errorOnly: false}
} }
// SetErrorOnly ensures that only errors are logged out
func (l *Logger) SetErrorOnly(errorOnly bool) { func (l *Logger) SetErrorOnly(errorOnly bool) {
l.errorOnly = errorOnly l.errorOnly = errorOnly
} }
@ -99,6 +100,7 @@ func (l *Logger) Error(format string, a ...interface{}) {
color.New(color.FgHiRed).PrintfFunc()("Error: "+format+"\n", a...) color.New(color.FgHiRed).PrintfFunc()("Error: "+format+"\n", a...)
} }
// PrintSmallBanner prints a condensed banner
func (l *Logger) PrintSmallBanner(message ...string) { func (l *Logger) PrintSmallBanner(message ...string) {
yellow := color.New(color.FgYellow).SprintFunc() yellow := color.New(color.FgYellow).SprintFunc()
red := color.New(color.FgRed).SprintFunc() red := color.New(color.FgRed).SprintFunc()

View File

@ -150,6 +150,7 @@ func (b *PackageHelper) packageOSX(po *ProjectOptions) error {
return err return err
} }
// PackageWindows packages the application for windows platforms
func (b *PackageHelper) PackageWindows(po *ProjectOptions, cleanUp bool) error { func (b *PackageHelper) PackageWindows(po *ProjectOptions, cleanUp bool) error {
basename := strings.TrimSuffix(po.BinaryName, ".exe") basename := strings.TrimSuffix(po.BinaryName, ".exe")

View File

@ -1 +0,0 @@
2b79f883dc856221fc3265755d610e40

View File

@ -2,4 +2,4 @@ package cmd
// Version - Wails version // Version - Wails version
// ...oO(There must be a better way) // ...oO(There must be a better way)
const Version = "v0.9.5" const Version = "v0.9.6"