forked from charmed-hpc/slurmctld-operator
-
Notifications
You must be signed in to change notification settings - Fork 2
/
charmcraft.yaml
37 lines (34 loc) · 993 Bytes
/
charmcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright 2020 Omnivector Solutions, LLC
# See LICENSE file for licensing details.
type: charm
bases:
- build-on:
- name: ubuntu
channel: "22.04"
run-on:
- name: ubuntu
channel: "22.04"
architectures: [amd64]
- name: ubuntu
channel: "20.04"
architectures: [amd64]
- name: centos
channel: "7"
architectures: [amd64]
parts:
charm:
build-packages: [git]
charm-python-packages: [setuptools]
# Create a version file and pack it into the charm. This is dynamically generated
# as part of the build process for a charm to ensure that the git revision of the
# charm is always recorded in this version file.
version-file:
plugin: nil
build-packages:
- git
override-build: |
VERSION=$(git -C $CRAFT_PART_SRC/../../charm/src describe --dirty --always)
echo "Setting version to $VERSION"
echo $VERSION > $CRAFT_PART_INSTALL/version
stage:
- version