From c6d193ac4676c13f9cf90f19a350f10f698e061c Mon Sep 17 00:00:00 2001 From: Mark Beierl Date: Fri, 14 Jun 2024 14:58:47 -0400 Subject: [PATCH] feat: adding craft version as a file (#26) --- CONTRIBUTING.md | 7 ++++--- rockcraft.yaml | 11 ++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3a32d8f..c6306be 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,8 @@ ## Build and deploy ```bash +sudo snap install rockcraft --classic --edge rockcraft pack -v -sudo skopeo --insecure-policy copy oci-archive:sdcore-ausf_1.4.0_amd64.rock docker-daemon:sdcore-ausf:1.4.0 -docker run sdcore-ausf:1.4.0 -``` \ No newline at end of file +sudo rockcraft.skopeo --insecure-policy copy oci-archive:sdcore-ausf_1.4.1_amd64.rock docker-daemon:sdcore-ausf:1.4.1 +docker run sdcore-ausf:1.4.1 +``` diff --git a/rockcraft.yaml b/rockcraft.yaml index ffd92ae..227850a 100644 --- a/rockcraft.yaml +++ b/rockcraft.yaml @@ -14,7 +14,7 @@ parts: plugin: go source: https://github.com/omec-project/ausf.git source-type: git - source-tag: v1.4.1 + source-tag: v${CRAFT_PROJECT_VERSION} build-snaps: - go/1.21/stable stage-packages: @@ -22,3 +22,12 @@ parts: - base-files_lib organize: bin/cmd: bin/ausf + version: + plugin: nil + override-build: | + mkdir -p ${CRAFT_PART_INSTALL}/etc/ + echo ${CRAFT_PROJECT_VERSION} > ${CRAFT_PART_INSTALL}/etc/workload-version + organize: + "*": etc/ + stage: + - etc/