Skip to content

Commit f7bfe6a

Browse files
authored
Remove MacOS and Windows support - fix (#411)
1 parent 4cfa58f commit f7bfe6a

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

tools/release/release.go

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// DISCLAIMER
33
//
4-
// Copyright 2017-2023 ArangoDB GmbH, Cologne, Germany
4+
// Copyright 2017-2024 ArangoDB GmbH, Cologne, Germany
55
//
66
// Licensed under the Apache License, Version 2.0 (the "License");
77
// you may not use this file except in compliance with the License.
@@ -25,7 +25,6 @@ import (
2525
"encoding/hex"
2626
"flag"
2727
"fmt"
28-
"io/ioutil"
2928
"log"
3029
"os"
3130
"os/exec"
@@ -52,11 +51,8 @@ var (
5251
dryRun bool // If set, do not really push a release or any git changes
5352

5453
binaries = map[string]string{
55-
"arangodb-darwin-amd64": "darwin/amd64/arangodb",
56-
"arangodb-darwin-arm64": "darwin/arm64/arangodb",
57-
"arangodb-linux-amd64": "linux/amd64/arangodb",
58-
"arangodb-linux-arm64": "linux/arm64/arangodb",
59-
"arangodb-windows-amd64.exe": "windows/amd64/arangodb.exe",
54+
"arangodb-linux-amd64": "linux/amd64/arangodb",
55+
"arangodb-linux-arm64": "linux/arm64/arangodb",
6056
}
6157
)
6258

@@ -91,7 +87,7 @@ func ensureGithubToken() {
9187
token := os.Getenv("GITHUB_TOKEN")
9288
if token == "" {
9389
p := filepath.Join(os.Getenv("HOME"), ".arangodb/github-token")
94-
if raw, err := ioutil.ReadFile(p); err != nil {
90+
if raw, err := os.ReadFile(p); err != nil {
9591
log.Fatalf("Failed to release '%s': %v", p, err)
9692
} else {
9793
token = strings.TrimSpace(string(raw))
@@ -242,9 +238,9 @@ func gitTag(tags ...string) {
242238
}
243239

244240
func createSHA256Sums() {
245-
sums := []string{}
241+
var sums []string
246242
for name, p := range binaries {
247-
blob, err := ioutil.ReadFile(filepath.Join(binFolder, p))
243+
blob, err := os.ReadFile(filepath.Join(binFolder, p))
248244
if err != nil {
249245
log.Fatalf("Failed to read binary '%s': %#v\n", name, err)
250246
}
@@ -253,7 +249,7 @@ func createSHA256Sums() {
253249
sums = append(sums, sha+" "+name)
254250
}
255251
sumsPath := filepath.Join(binFolder, "SHA256SUMS")
256-
if err := ioutil.WriteFile(sumsPath, []byte(strings.Join(sums, "\n")+"\n"), 0644); err != nil {
252+
if err := os.WriteFile(sumsPath, []byte(strings.Join(sums, "\n")+"\n"), 0644); err != nil {
257253
log.Fatalf("Failed to write '%s': %#v\n", sumsPath, err)
258254
}
259255
}

0 commit comments

Comments
 (0)