File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ source-code: https://github.com/NVIDIA/OpenShell
1414website : https://github.com/NVIDIA/OpenShell
1515donation : https://nvidia.com/
1616
17- grade : stable
17+ adopt-info : workspace
1818confinement : strict
1919
2020apps :
@@ -60,13 +60,43 @@ parts:
6060 - clang
6161 - libclang-dev
6262 - libz3-dev
63+ - git
6364 stage-packages :
6465 - libz3-4
6566 - skopeo
6667 - openssh-client
6768 - curl
6869 rust-features : []
6970 rust-path : ["crates/openshell-cli", "crates/openshell-server", "crates/openshell-driver-vm"]
71+ override-pull : |
72+ # Pull the source using snapcraft.
73+ craftctl default
74+
75+ # Set defaults.
76+ grade=devel
77+ full_tag="$(git describe --tags --abbrev=0 2>/dev/null)" || true
78+ hash="$(git rev-parse --short HEAD 2>/dev/null)"
79+
80+ # Remove leading 'v' from tag for the version string.
81+ tag="${full_tag#v}"
82+
83+ # Check for tagged version.
84+ if [ -n "$full_tag" ]; then
85+ count="$(git rev-list "$full_tag".. --count 2>/dev/null)"
86+ if [ "$count" -eq 0 ]; then
87+ version="$tag"
88+ grade=stable
89+ else
90+ version="$tag+git$count.$hash"
91+ fi
92+ else
93+ count="$(git rev-list HEAD --count 2>/dev/null)"
94+ version="0+git$count.$hash"
95+ fi
96+
97+ # Relay back to snapcraft.
98+ craftctl set grade="$grade"
99+ craftctl set version="$version"
70100
71101 vm-runtime :
72102 plugin : nil
You can’t perform that action at this time.
0 commit comments