Convert to force cargo version, allow override in recipe

This commit is contained in:
Jeremy Soller 2017-03-27 21:17:12 -06:00
parent 3536471c47
commit f2f5487313
2 changed files with 12 additions and 5 deletions

12
cook.sh
View File

@ -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)

View File

@ -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