Skip to content
Snippets Groups Projects
Verified Commit fedb15ba authored by nd's avatar nd
Browse files

move script to shared repo

parent 647ced85
No related branches found
No related tags found
No related merge requests found
Pipeline #8597 passed
...@@ -21,12 +21,13 @@ autoupdate: ...@@ -21,12 +21,13 @@ autoupdate:
script: script:
- git clone "https://${GITLAB_ACCESS_USER}:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" autoupdate-checkout - git clone "https://${GITLAB_ACCESS_USER}:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" autoupdate-checkout
- cd autoupdate-checkout - cd autoupdate-checkout
- git push - wget https://git.cccv.de/infra/packages/ci-utils/-/raw/main/filter-versions-from-github.py
- ./filter-versions.py - chmod 555 filter-versions-from-github.py
- ./filter-versions-from-github.py
- | - |
git config --global user.email "infra+packages-autoupdate@cccv.de" git config --global user.email "infra+packages-autoupdate@cccv.de"
git config --global user.name "autoupdater" git config --global user.name "autoupdater"
for version in $(./filter-versions.py); do for version in $(./filter-versions-from-github.py); do
printf "variables:\n UPSTREAM_VERSION: ${version}" > gitlabci-version.yml printf "variables:\n UPSTREAM_VERSION: ${version}" > gitlabci-version.yml
git commit -m "[autoupdate] Bump version to ${version}" gitlabci-version.yml git commit -m "[autoupdate] Bump version to ${version}" gitlabci-version.yml
git tag "${version}" git tag "${version}"
......
#!/usr/bin/env python3
import requests
import git
githubpath = "martin-helmich/prometheus-nginxlog-exporter"
repo = git.Repo('.')
req = requests.get(f"https://api.github.com/repos/{githubpath}/releases")
releases = [ release['tag_name'] for release in req.json() ]
releases.sort()
for release in releases:
release_exists = False
for tag in repo.tags:
if tag.name == release:
release_exists = True
break
if release_exists:
continue
print(release)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment