From 552ce43474d492d01b1e64aa1afb556c85b69f8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20T=C3=B3th?= <tothmiklostibor@gmail.com> Date: Mon, 4 Oct 2021 12:22:44 +0200 Subject: [PATCH] remove randomizing --- .gitlab-ci.yml | 2 +- data/data.go | 17 +++-------------- k8s/values.yaml | 2 +- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 57e57d4..900c751 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ image: alpine variables: - VERSION: v2.4 + VERSION: v2.5 stages: - build diff --git a/data/data.go b/data/data.go index 77fe3df..81c5fd2 100644 --- a/data/data.go +++ b/data/data.go @@ -4,7 +4,6 @@ import ( "embed" "gopkg.in/yaml.v3" "io/ioutil" - "math/rand" ) //go:embed storyTemplates/* @@ -43,22 +42,12 @@ func ReadFile() { } func CreateNewRoute() []string { - stationIds := make([]string, len(Stations)-2) + stationIds := make([]string, len(Stations)) i := 0 for k := range Stations { - switch k { - case "first", "last": - default: - stationIds[i] = k - i++ - } + stationIds[i] = k + i++ } - rand.Shuffle(len(stationIds), func(i, j int) { - stationIds[i], stationIds[j] = stationIds[j], stationIds[i] - }) - - stationIds = append([]string{"first"}, stationIds...) - stationIds = append(stationIds, "last") return stationIds } diff --git a/k8s/values.yaml b/k8s/values.yaml index 4cfd89c..dbf0ef1 100644 --- a/k8s/values.yaml +++ b/k8s/values.yaml @@ -2,5 +2,5 @@ replicas: 1 Domain: keresettaferi.kszk.bme.hu Name: keresettaferi -Tag: "v2.4" +Tag: "v2.5" REGISTRY_CONF: "${REGISTRY_CONF}" -- GitLab