From f2f5487313786a6fb30d071e4e4bf862b1396e1a Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jackpot51@gmail.com> Date: Mon, 27 Mar 2017 21:17:12 -0600 Subject: [PATCH] Convert to force cargo version, allow override in recipe --- cook.sh | 12 +++++++----- recipes/orbdata/recipe.sh | 5 +++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/cook.sh b/cook.sh index 9d6e9123b..a310cbc29 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 e7ecb8412..ed2b4c208 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 -- GitLab