fix: arduino-create-agent (#4534)

* fix: arduino-create-agent

Signed-off-by: madomado <madonuko@outlook.com>

* Delete anda/tools/arduino-create-agent/update.patch

Signed-off-by: madomado <madonuko@outlook.com>

* Update arduino-create-agent.spec

Signed-off-by: madomado <madonuko@outlook.com>

* wat

Signed-off-by: madomado <madonuko@outlook.com>

* what the heck?

---------

Signed-off-by: madomado <madonuko@outlook.com>
This commit is contained in:
madomado
2025-05-05 23:31:51 +08:00
committed by GitHub
parent aa4aa98db4
commit 7b027b343b
2 changed files with 2 additions and 27 deletions
@@ -20,7 +20,6 @@ Packager: Owen Zimmerman <owen@fyralabs.com>
URL: %{gourl}
Source: %{url}/archive/%{version}.tar.gz
Patch0: update.patch
BuildRequires: anda-srpm-macros
%description %{common_description}
@@ -29,10 +28,11 @@ BuildRequires: anda-srpm-macros
%prep
%goprep
%autopatch -p1
%go_prep_online
%build
sed -E '/^func Start\(/,/^\}$/s@return start\(src\)@return ""@' -i updater/updater.go
sed -E '\?r.POST\("/update", updateHandler\)?d' -i main.go
%define gomodulesmode GO111MODULE=on
%gobuild -o %{gobuilddir}/bin/arduino-create-agent %{goipath}
@@ -1,25 +0,0 @@
diff --git a/main.go b/main.go
index 1ca857b..c945487 100755
--- a/main.go
+++ b/main.go
@@ -461,7 +461,6 @@ func loop() {
r.Handle("WSS", "/socket.io/", socketHandler)
r.GET("/info", infoHandler)
r.POST("/pause", pauseHandler)
- r.POST("/update", updateHandler)
// Mount goa handlers
goa := v2.Server(config.GetDataDir().String(), Index)
diff --git a/updater/updater.go b/updater/updater.go
index db4e545..693431a 100644
--- a/updater/updater.go
+++ b/updater/updater.go
@@ -34,7 +34,7 @@ import (
// binary to be executed to perform the update. If no update has been downloaded
// it returns an empty string.
func Start(src string) string {
- return start(src)
+ return ""
}
// CheckForUpdates checks if there is a new version of the binary available and