Skip to content

Commit

Permalink
feat: adding craft version as a file (#24)
Browse files Browse the repository at this point in the history
Creates a new part for storing the content of the craft version variable
  • Loading branch information
markbeierl authored Jun 14, 2024
1 parent a855796 commit 00418f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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-udr_1.4.0_amd64.rock docker-daemon:sdcore-udr:1.4.0
docker run sdcore-udr:1.4.0
sudo rockcraft.skopeo --insecure-policy copy oci-archive:sdcore-udr_1.4.1_amd64.rock docker-daemon:sdcore-udr:1.4.1
docker run sdcore-udr:1.4.1
```
11 changes: 10 additions & 1 deletion rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,20 @@ parts:
plugin: go
source: https://github.com/omec-project/udr.git
source-type: git
source-tag: v1.4.1
source-tag: v${CRAFT_PROJECT_VERSION}
build-snaps:
- go/1.21/stable
stage-packages:
- libc6_libs
- base-files_lib
organize:
bin/cmd: bin/udr
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/

0 comments on commit 00418f8

Please sign in to comment.