diff --git a/cook.sh b/cook.sh index 9d6e9123..a310cbc2 100755 --- a/cook.sh +++ b/cook.sh @@ -46,13 +46,15 @@ function op { ;; info) pushd build > /dev/null - if [ -e Cargo.toml ] + skip="0" + if [ "$(type -t recipe_info)" = "function" ] then - package_version="$(cargo config package.version | tr -d '"')" - else - package_version="$(git rev-parse --short HEAD)" + recipe_info || skip="1" + fi + if [ "$skip" -eq "0" ] + then + echo "$1_$(cargo config package.version | tr -d '"')" fi - echo "$1_${package_version}" popd > /dev/null ;; update) diff --git a/recipes/orbdata/recipe.sh b/recipes/orbdata/recipe.sh index e7ecb841..ed2b4c20 100644 --- a/recipes/orbdata/recipe.sh +++ b/recipes/orbdata/recipe.sh @@ -1,5 +1,10 @@ GIT=https://github.com/redox-os/orbdata.git +function recipe_info { + echo "orbdata_0.0.1" + return 1 +} + function recipe_update { echo "skipping update" return 1