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

Added custom releases to fix (missing) versioning #6336

Merged
merged 2 commits into from
Aug 5, 2024
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
21 changes: 17 additions & 4 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4065,8 +4065,8 @@
{
"customType": "regex",
"datasourceTemplate": "github-releases",
"depNameTemplate": "k3s-io/k3s",
"extractVersionTemplate": "^v(?<version>.+)$",
"depNameTemplate": "uniget-org/renovate-custom",
"extractVersionTemplate": "^k3s/(?<version>.+)$",
"fileMatch": [
"^tools/k3s/manifest.yaml$"
],
Expand Down Expand Up @@ -6536,6 +6536,19 @@
],
"versioningTemplate": "loose"
},
{
"customType": "regex",
"datasourceTemplate": "github-releases",
"depNameTemplate": "uniget-org/renovate-custom",
"extractVersionTemplate": "^passage/(?<version>.+)$",
"fileMatch": [
"^tools/passage/manifest.yaml$"
],
"matchStrings": [
"version: \"?(?<currentValue>.*?)\"?\\n"
],
"versioningTemplate": "loose"
},
{
"customType": "regex",
"datasourceTemplate": "github-tags",
Expand Down Expand Up @@ -7125,8 +7138,8 @@
{
"customType": "regex",
"datasourceTemplate": "github-releases",
"depNameTemplate": "rancher/rke2",
"extractVersionTemplate": "^v(?<version>.+)$",
"depNameTemplate": "uniget-org/renovate-custom",
"extractVersionTemplate": "^rke2/(?<version>.+)$",
"fileMatch": [
"^tools/rke2/manifest.yaml$"
],
Expand Down
4 changes: 2 additions & 2 deletions tools/cobra-cli/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: cobra-cli
license:
name: Apache License 2.0
link: https://github.com/spf13/cobra-cli/blob/main/LICENSE.txt
version: "1.3.0" # No version parameter
check: ""
version: "1.3.0"
check: "" # No version parameter
build_dependencies:
- go
- make
Expand Down
11 changes: 8 additions & 3 deletions tools/k3s/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ case "${arch}" in
esac
echo " Using ${arch_suffix}"

check-github-release-asset "k3s-io/k3s" "v${version}" "k3s${arch_suffix}"
real_version="$(
echo "${version}" \
| sed -E 's/^([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)\.([[:digit:]]+)$/\1+k3s\2/'
)"

echo "### Downloading ${name} ${version}"
check-github-release-asset "k3s-io/k3s" "v${real_version}" "k3s${arch_suffix}"

echo "### Downloading ${name} ${real_version}"
curl --silent --show-error --location --fail --output "${prefix}/bin/k3s" \
"https://github.com/k3s-io/k3s/releases/download/v${version}/k3s${arch_suffix}"
"https://github.com/k3s-io/k3s/releases/download/v${real_version}/k3s${arch_suffix}"
chmod +x "${prefix}/bin/k3s"
"${prefix}/bin/k3s" completion bash >"${prefix}/share/bash-completion/completions/k3s"
"${prefix}/bin/k3s" completion zsh >"${prefix}/share/zsh/vendor-completions/_k3s"
Expand Down
13 changes: 9 additions & 4 deletions tools/k3s/manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# yaml-language-server: $schema=https://tools.uniget.dev/schema.yaml
name: k3s
version: "1.30.3+k3s1"
license:
name: Apache License 2.0
link: https://github.com/k3s-io/k3s/blob/master/LICENSE
version: "1.30.3.1"
check: ${binary} --version | head -n 1 | cut -d' ' -f3 | tr -d v
platforms:
- linux/amd64
Expand All @@ -22,6 +25,8 @@ renovate:
extractVersion: ^v(?<version>.+)$
versioning: loose
priority: high
license:
name: Apache License 2.0
link: https://github.com/k3s-io/k3s/blob/master/LICENSE
renovate:
datasource: github-releases
package: uniget-org/renovate-custom
extractVersion: ^k3s/(?<version>.+)$
versioning: loose
9 changes: 6 additions & 3 deletions tools/passage/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ WORKDIR /tmp/pass
ARG name
ARG version
RUN <<EOF
curl --silent --show-error --location --fail --remote-name https://github.com/FiloSottile/passage/archive/refs/heads/main.zip
unzip main.zip
cd passage-main
COMMIT="$(
echo "${version}" \
| cut -d. -f2
)"
git clone https://github.com/FiloSottile/passage .
git reset --hard "${COMMIT}"
make -j$(nproc) install \
DESTDIR="${prefix}" \
PREFIX="" \
Expand Down
13 changes: 9 additions & 4 deletions tools/passage/manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# yaml-language-server: $schema=https://tools.uniget.dev/schema.yaml
name: passage
version: "master"
license:
name: GPLv2
link: https://github.com/FiloSottile/passage/blob/main/COPYING
version: "524.42cb195"
check: ${binary} version 2>/dev/null | tr -s ' ' | grep "^= v" | cut -d' ' -f2 | tr -d v
build_dependencies:
- make
Expand All @@ -16,6 +19,8 @@ tags:
homepage: https://github.com/FiloSottile/passage
repository: https://github.com/FiloSottile/passage
description: Fork of password-store that uses age as backend
license:
name: GPLv2
link: https://github.com/FiloSottile/passage/blob/main/COPYING
renovate:
datasource: github-releases
package: uniget-org/renovate-custom
extractVersion: ^passage/(?<version>.+)$
versioning: loose
9 changes: 7 additions & 2 deletions tools/rke2/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
check-github-release-asset "rancher/rke2" "v${version}" "rke2.linux-${alt_arch}.tar.gz"
curl --silent --show-error --location --fail "https://github.com/rancher/rke2/releases/download/v${version}/rke2.linux-${alt_arch}.tar.gz" \
real_version="$(
echo "${version}" \
| sed -E 's/^([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)\.([[:digit:]]+)$/\1+rke2r\2/'
)"

check-github-release-asset "rancher/rke2" "v${real_version}" "rke2.linux-${alt_arch}.tar.gz"
curl --silent --show-error --location --fail "https://github.com/rancher/rke2/releases/download/v${real_version}/rke2.linux-${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}" --no-same-owner \
bin/rke2 \
lib
Expand Down
13 changes: 9 additions & 4 deletions tools/rke2/manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# yaml-language-server: $schema=https://tools.uniget.dev/schema.yaml
name: rke2
version: "1.30.2+rke2r1"
license:
name: Apache License 2.0
link: https://github.com/rancher/rke2/blob/master/LICENSE
version: "1.30.2.1"
check: ${binary} --version | grep ^rke2 | cut -d' ' -f3 | tr -d v
platforms:
- linux/amd64
Expand All @@ -21,6 +24,8 @@ renovate:
extractVersion: ^v(?<version>.+)$
versioning: loose
priority: low
license:
name: Apache License 2.0
link: https://github.com/rancher/rke2/blob/master/LICENSE
renovate:
datasource: github-releases
package: uniget-org/renovate-custom
extractVersion: ^rke2/(?<version>.+)$
versioning: loose
Loading