diff --git a/cook.sh b/cook.sh index 9d6e9123b7593705974a799745a4b4f69b5d3802..a310cbc295d1570b7dd92a41d9c9f97cbb331e9d 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 + recipe_info || skip="1" + fi + if [ "$skip" -eq "0" ] then - package_version="$(cargo config package.version | tr -d '"')" - else - package_version="$(git rev-parse --short HEAD)" + 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 e7ecb8412fdb241bafc2edaad357ec62f78ff129..ed2b4c2085ecc3bcb44f266218ba239761b9e8b2 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