Skip to content

Commit

Permalink
Bugfix/linter update new errors (merge commit)
Browse files Browse the repository at this point in the history
Merge branch 'bugfix/linter-update-new-errors' into 'main'
* Update release version in files

* Fix linter errors in github workflow

See merge request https://gitlab.ci.csc.fi/sds-dev/sd-desktop/sda-filesystem/-/merge_requests/39

Approved-by: Joonatan Mäkinen <jmakine@csc.fi>
Co-authored-by: Emmi Rehn <emmi.rehn@csc.fi>
Merged by Emmi Rehn <emrehn@csc.fi>
  • Loading branch information
Emmi Rehn committed Aug 19, 2024
2 parents 76a1de7 + 3d7f584 commit ce8734a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
with:
version: latest
args: -E bodyclose,gocritic,gofmt,gosec,govet,nestif,nlreturn,revive,rowserrcheck --exclude G401,G501,G107 --timeout=10m
skip-pkg-cache: true
skip-cache: true
16 changes: 8 additions & 8 deletions cmd/gui/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (a *App) Panic() {
}
result, err := wailsruntime.MessageDialog(a.ctx, options)
if err != nil {
logs.Error(fmt.Errorf("Dialog gave an error, could not respond to user decision: %w", err))
logs.Error(fmt.Errorf("dialog gave an error, could not respond to user decision: %w", err))
} else if result == quitButton {
wailsruntime.EventsEmit(a.ctx, "saveLogsAndQuit")
}
Expand Down Expand Up @@ -101,21 +101,21 @@ func (a *App) InitializeAPI() error {
if err != nil {
logs.Error(err)

return fmt.Errorf("Required environmental variables missing")
return errors.New("required environmental variables missing")
}

err = api.InitializeCache()
if err != nil {
logs.Error(err)

return fmt.Errorf("Initializing cache failed")
return errors.New("initializing cache failed")
}

err = api.InitializeClient()
if err != nil {
logs.Error(err)

return fmt.Errorf("Initializing HTTP client failed")
return errors.New("initializing HTTP client failed")
}

noneAvailable := true
Expand All @@ -129,7 +129,7 @@ func (a *App) InitializeAPI() error {
}

if noneAvailable {
return fmt.Errorf("No services available")
return errors.New("no services available")
}

return nil
Expand All @@ -140,7 +140,7 @@ func (a *App) Authenticate(repository string) error {
logs.Error(err)
message, _ := logs.Wrapper(err)

return fmt.Errorf(message)
return errors.New(message)
}

return nil
Expand All @@ -156,7 +156,7 @@ func (a *App) Login(username, password string) (bool, error) {
}
message, _ := logs.Wrapper(err)

return false, fmt.Errorf(message)
return false, errors.New(message)
}

logs.Info("Login successful")
Expand Down Expand Up @@ -328,7 +328,7 @@ func (a *App) ExportFile(file, folder string, encrypted bool) error {
logs.Error(err)
message, _ := logs.Wrapper(err)

return fmt.Errorf(message)
return errors.New(message)
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion cmd/gui/wails.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"info": {
"companyName": "CSC",
"productName": "Data Gateway",
"productVersion": "2024.03.1",
"productVersion": "2024.06.0",
"copyright": "MIT"
}
}
10 changes: 5 additions & 5 deletions docs/linux-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ or download the release:
```bash
sudo mkdir -p /etc/sda-fuse
cd /etc/sda-fuse/
export version=2024.03.1
export version=2024.06.0
wget "https://github.com/CSCfi/sda-filesystem/releases/download/${version}/go-fuse-gui-linux-amd64.zip"
```

Install the software:
```bash
sudo unzip -qq go-fuse-gui-linux-amd64.zip
sudo mv /etc/sda-fuse/data-gateway /etc/sda-fuse/data-gateway
sudo chmod 755 /etc/sda-fuse/data-gateway
sudo ln -s /etc/sda-fuse/data-gateway /usr/bin/data-gateway
sudo mv /etc/sda-fuse/data-gateway /etc/sda-fuse/data-gateway
sudo chmod 755 /etc/sda-fuse/data-gateway
sudo ln -s /etc/sda-fuse/data-gateway /usr/bin/data-gateway
sudo wget https://raw.githubusercontent.com/CSCfi/sda-filesystem/refactor/wails-gui/build/appicon.png --directory-prefix=/etc/sda-fuse
sudo cat > /etc/skel/Desktop/filesystem.desktop << EOF
[Desktop Entry]
Type=Application
Terminal=false
Exec=/usr/bin/data-gateway
Exec=/usr/bin/data-gateway
Name=Data Gateway
Comment=
Icon=/etc/sda-fuse/appicon.png
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "frontend",
"private": true,
"version": "2024.03.1",
"version": "2024.06.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down

0 comments on commit ce8734a

Please sign in to comment.