Skip to content

Commit

Permalink
Merge pull request #60 from Mailaender/auto-update
Browse files Browse the repository at this point in the history
Automatically update
  • Loading branch information
merlijn-sebrechts authored Dec 27, 2023
2 parents f6d081e + 5d6409f commit f48721a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/sync-version-with-upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Update

on:
# Runs at 10:00 UTC every day
schedule:
- cron: '0 10 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
sync:
name: 🔄 Sync version with upstream
environment: "Candidate Branch"
runs-on: ubuntu-latest
steps:
- name: 🔄 Sync version with upstream
uses: snapcrafters/ci/sync-version@main
with:
token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
update-script: |
VERSION=$(
curl -sL https://download.eclipse.org/technology/epp/downloads/release/release.xml |
grep -oPm1 "(?<=<present>)[^<]+" | sed 's/\/R//'
)
sed -i 's/^\(version: \).*$/\1'"$VERSION"'/' snap/snapcraft.yaml
5 changes: 3 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ base: core22

version: '2023-12'
summary: Extensible Tool Platform and Java IDE
website: https://eclipse.org/ide
description:
Eclipse provides IDEs and platforms for nearly every language and architecture.
We are famous for our Java IDE, C/C++, JavaScript and PHP IDEs built on extensible
Expand All @@ -24,8 +25,8 @@ parts:
eclipse:
plugin: dump
source:
- on amd64: https://download.eclipse.org/technology/epp/downloads/release/2023-12/R/eclipse-java-2023-12-R-linux-gtk-x86_64.tar.gz
- on arm64: https://download.eclipse.org/technology/epp/downloads/release/2023-12/R/eclipse-java-2023-12-R-linux-gtk-aarch64.tar.gz
- on amd64: "https://download.eclipse.org/technology/epp/downloads/release/$SNAPCRAFT_PROJECT_VERSION/R/eclipse-java-$SNAPCRAFT_PROJECT_VERSION-R-linux-gtk-x86_64.tar.gz"
- on arm64: "https://download.eclipse.org/technology/epp/downloads/release/$SNAPCRAFT_PROJECT_VERSION/R/eclipse-java-$SNAPCRAFT_PROJECT_VERSION-R-linux-gtk-aarch64.tar.gz"
build-attributes:
- no-patchelf
stage-packages:
Expand Down

0 comments on commit f48721a

Please sign in to comment.