-
Notifications
You must be signed in to change notification settings - Fork 36
Description
I'm unsure if this should be posted under Recipes, Compile, or Scripts. if this is the wrong place for it feel free to move it or lmk.
Feature Request
Having an internal versioning system for recipes, as a way to check if the recipe you used has had any changes since you compiled the program.
Potentially through logging the recipe's source and commit to a Resources file.
Issue
Say I install Bash 5.1 from Recipe, and then a few days later an issue is found+fixed in the recipe. Currently I'd have no way of knowing (w/o manual checking of dates) if I used the version before or after the Recipe's change.
This issue is found first hand with the installed version of Bzip2 1.0.8 provided in Gobo017, having used an outdated Recipe file, leading to some programs failing to find it's shared library.
Proposed Method
Having Compile (or an adjacent script) log some information about the Recipe, for exanple using git log [FOLDER_PATH] |head -1 > $target/Resources/RecipeCommit to get the commit.
Then be able to check it against the current version in Recipes as follows:
local name="$1" # program name
local version="$2" # program version
local recipesfolder="/Data/Compile/Recipes/${name}/${version}"
local installedfolder="/Programs/${name}/${version}"
local recipescommit=$(git log "${recipesfolder}" |head -1)
local installedcommit=$(cat "${installedfolder}/Resources/RecipeCommit")
if [[ "${recipescommit}" == "${installedcommit}" ]]
then
echo "up to date"
else
echo "out of date"
fiIdeally, a bit more than just the commit would be logged, potentially the git repository/fork, branch, and commit; just something concrete, fast to generate, and easy to compare.