Skip to content

Commit

Permalink
feat: adding craft version as a file (#27)
Browse files Browse the repository at this point in the history
Co-authored-by: Ghislain Bourgeois <[email protected]>
  • Loading branch information
Mark Beierl and ghislainbourgeois authored Jun 14, 2024
1 parent 428521a commit 99189b6
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-smf_1.4.0_amd64.rock docker-daemon:sdcore-smf:1.4.0
docker run sdcore-smf:1.4.0
sudo rockcraft.skopeo --insecure-policy copy oci-archive:sdcore-smf_1.4.2_amd64.rock docker-daemon:sdcore-smf:1.4.2
docker run sdcore-smf:1.4.2
```
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/smf.git
source-type: git
source-tag: v1.4.2
source-tag: v${CRAFT_PROJECT_VERSION}
build-snaps:
- go/1.21/stable
stage-packages:
- libc6_libs
- base-files_lib
organize:
bin/cmd: bin/smf
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 99189b6

Please sign in to comment.