Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update linuxserver/jackett Docker tag to v0.21.1084 #62

Merged
merged 6 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/jackett/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ apiVersion: v2
type: application
name: jackett
description: "Jackett works as a proxy server: it translates queries from apps into tracker-site-specific http queries."
version: 1.1.11
appVersion: "0.21.709"
version: 1.1.12
appVersion: "0.21.1084"
icon: https://raw.githubusercontent.com/RubxKube/charts/main/img/jackett-logo.png
maintainers:
- name: QJOLY
Expand Down
2 changes: 1 addition & 1 deletion charts/jackett/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ common:
isPrivate: false
secretName: null
repository: linuxserver/jackett
tag: 0.21.709
tag: 0.21.1084
pullPolicy: Always

# ingress
Expand Down
80 changes: 80 additions & 0 deletions hack/update_after_renovate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package main

import (
"fmt"
"log"
"os"
"strconv"
"strings"

dig_yaml "github.com/esakat/dig-yaml"
"gopkg.in/yaml.v2"
)

func main() {

var chartName = os.Getenv("CHART")

chartPath := fmt.Sprintf("charts/%s/Chart.yaml", chartName)
valuePath := fmt.Sprintf("charts/%s/values.yaml", chartName)

f, err := os.Open(chartPath)
defer f.Close()
if err != nil {
log.Fatal(err)
}

dec := yaml.NewDecoder(f)
var y map[interface{}]interface{}
dec.Decode(&y)

chartVersion, err := dig_yaml.DigYaml(y, "appVersion")
if err != nil {
log.Fatal(err)
}

chartRelease, err := dig_yaml.DigYaml(y, "version")
if err != nil {
log.Fatal(err)
}

f, err = os.Open(valuePath)
defer f.Close()
if err != nil {
log.Fatal(err)
}

dec = yaml.NewDecoder(f)
dec.Decode(&y)

appVersion, err2 := dig_yaml.DigYaml(y, "common", "image", "tag")
if err2 != nil {
log.Fatal(err2)
}

if appVersion != chartVersion {
fmt.Printf("βœ–οΈ Versions in 'Chart.yaml'(%s) and 'values.yaml'(%s) are differents.\n", chartVersion, appVersion)
} else {
fmt.Println("βœ”οΈ Versions are identicals.")
os.Exit(0)
}

v := strings.Split(chartRelease.(string), ".")
x, _ := strconv.ParseInt((v[len(v)-1]), 10, 0)
x += 1
v = v[:len(v)-1]
v = append(v, fmt.Sprint("", x))

newChartRelease := strings.Join(v, ".")

var sedHelp = fmt.Sprintf(`
If you want to replace the version in Chart.yaml file, please execute this command:

sed -i 's/%s/%s/' -i %s
sed -i 's/%s/%s/' -i %s
git add %s
git commit -m "%s: update version to match docker image tag"
`, chartVersion, appVersion, chartPath, chartRelease, newChartRelease, chartPath, chartPath, chartName)

fmt.Println(sedHelp)
}
Loading