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

Logic for upstream version sync added #54

Merged
merged 8 commits into from
Dec 15, 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
9 changes: 7 additions & 2 deletions .github/workflows/sync-version-with-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ jobs:
with:
token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
update-script: |
#!/bin/bash
# Update the snapcraft.yaml to match upstream version
API="https://api.github.com/repos/jenkinsci/jenkins/releases/latest"
VERSION=$(curl -s "${API}" | grep -i name | awk 'FNR == 3 {print $2}' | cut -d ',' -f1)
sed -i 's/^\(version: \).*$/\1'"$VERSION"'/' snap/snapcraft.yaml
VERSION=$(curl -s "${API}" | grep -i name | awk 'FNR == 3 {print $2}' | cut -d ',' -f1 | sed 's/"//g')
kz6fittycent marked this conversation as resolved.
Show resolved Hide resolved
CRAFT=$(grep -i version snap/snapcraft.yaml | awk '{print $2}' | sed 's/"//g')
# Running checks here
if [[ "${CRAFT}" < "${VERSION}" ]]; then
sed -i 's/^\(version: \).*$/\1'"'$VERSION'"'/' snap/snapcraft.yaml
fi
4 changes: 2 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ issues: https://github.com/snapcrafters/jenkins/issues
source-code: https://github.com//snapcrafters/jenkins
license: MIT
icon: snap/local/jenkins.png
version: "2.426.2"
version: '2.436'

base: core22
confinement: classic
Expand All @@ -40,7 +40,7 @@ parts:
jenkins:
plugin: nil
source: https://github.com/jenkinsci/jenkins.git
source-tag: jenkins-$SNAPCRAFT_PROJECT_VERSION
source-tag: jenkins-$SNAPCRAFT_PROJECT_VERSION
stage-packages:
- fonts-dejavu-core
- libfontconfig1
Expand Down
Loading