Compare commits

...

3 commits

Author SHA1 Message Date
fd320d9ec3 chore(): Migrates from the deprecated ioutil
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2024-12-17 21:58:48 +01:00
6dbc5784df Add renovate.json
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-01-14 20:48:48 +00:00
8c2797cc82 chore(): Adds checksum to the releases for verification
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2023-07-02 22:12:14 +02:00
3 changed files with 28 additions and 11 deletions

View file

@ -5,11 +5,15 @@ name: test
steps:
- name: test-code
image: golang
environment:
commands:
- go get
- go test
- go get
- go test
- name: run-code
image: golang
commands:
- go get
- go run .
---
kind: pipeline
name: test-build
@ -143,6 +147,21 @@ steps:
depends_on:
- prepare
- name: generate-checksum
image: golang
commands:
- cd bin
- md5sum * > ../md5sums.txt
- sha512sum * > ../sha512sums.txt
- cp ../md5sums.txt .
- cp ../sha512sums.txt .
depends_on:
- build-linux-amd64
- build-darwin-amd64
- build-windows-amd64
- build-linux-arm64
- build-darwin-arm64
- name: gitea_release
image: plugins/gitea-release
settings:
@ -154,11 +173,7 @@ steps:
base_url: https://scm.project42.io
files: bin/*
depends_on:
- build-linux-amd64
- build-darwin-amd64
- build-windows-amd64
- build-linux-arm64
- build-darwin-arm64
- generate-checksum
depends_on:
- test-build

View file

@ -3,7 +3,6 @@ package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
@ -15,7 +14,7 @@ import (
)
// VERSION The version release
const VERSION = "0.1.4"
const VERSION = "0.1.5"
// AUTHOR The author name
const AUTHOR = "Elia el Lazkani"
@ -72,7 +71,7 @@ func (w weather) get(req *http.Request, download bool) {
// `weather` method to print the weather
func (w weather) print(resp *http.Response) {
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal("Error reading body. ", err)
}

3
renovate.json Normal file
View file

@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}