Skip to content

Commit

Permalink
feat: add a rock for core24 Snapcraft 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
tigarmo committed Mar 5, 2024
1 parent 22a80f3 commit 038fb2b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-rock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:

- name: Build rock
uses: canonical/craft-actions/rockcraft-pack@main
with:
rockcraft-channel: candidate # Temporarily until 1.2.2 is in 'stable'

- name: Get rock name
id: vars
Expand Down
12 changes: 5 additions & 7 deletions rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: snapcraft-core22
base: [email protected]
name: snapcraft-core24
base: [email protected]
build-base: devel
version: 8.0.4
summary: easily create core22 snaps
summary: easily create core24 snaps
description: |
Snapcraft aims to make upstream developers' lives easier and as such is not
a single toolset, but instead is a collection of tools that enable the
natural workflow of an upstream to be extended with a simple release step
into Snappy.
This version of Snapcraft is able to build core22 snaps in destructive mode
This version of Snapcraft is able to build core24 snaps in destructive mode
only.
license: GPL-3.0
platforms:
Expand All @@ -23,9 +24,6 @@ parts:
python-packages:
- wheel
- pip
# Limited to < 66 because we need `pkg_resources` and because `python-apt`
# does not build with the latest (shouldn't this be in constraints.txt?)
- setuptools<66
python-constraints:
- constraints.txt
python-requirements:
Expand Down
7 changes: 5 additions & 2 deletions spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ environment:
SNAPD_TESTING_TOOLS: $PROJECT_PATH/tools/external/snapd-testing-tools/tools
PATH: /snap/bin:$PATH:$SNAPD_TESTING_TOOLS:$PROJECT_PATH/tools/spread
# These variables are used to set the base in multi-base projects
SNAPCRAFT_BASE: core22
SNAPCRAFT_BUILD_BASE: core22
SNAPCRAFT_BASE: core24
SNAPCRAFT_BUILD_BASE: devel

include:
- tests/
Expand Down Expand Up @@ -79,6 +79,9 @@ prepare: |
load_snapcraft_rock
# while core24 is unstable we need to install it explicitly
snap install --edge core24
restore-each: |
# Cleanup after each task.
Expand Down
6 changes: 3 additions & 3 deletions tests/spread/general/craftctl/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ parts:
override-pull: |
echo -e "#!/usr/bin/env bash\necho hello" > hello.sh
chmod +x hello.sh
craftctl get grade | grep devel
# we only set the 'version' and not the 'grade' here because projects
# with 'devel' build-base can only have 'devel' grade. We can update
# this when core24 is stable.
craftctl set version="22"
craftctl set grade=stable
override-build: |
craftctl get version | grep 22
craftctl get grade | grep stable
echo "This is the build step"
cp hello.sh "$CRAFT_PART_INSTALL"/

0 comments on commit 038fb2b

Please sign in to comment.