Skip to content

Commit

Permalink
Traktor: Able to sync 3rdp to a specific hash in case some of the dep…
Browse files Browse the repository at this point in the history
…endencies break.
  • Loading branch information
apistol78 committed Jan 1, 2025
1 parent b47cb6b commit 4a7be00
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scripts/misc/update-3rdp.run
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ local PACKAGES =
{
type = "GIT",
name = "mimalloc",
hash = "095abc9e3d71ced049d7b6a400cb3866cc2d5999",
url = "https://github.com/microsoft/mimalloc.git",
license = "MIT"
},
Expand Down Expand Up @@ -595,7 +596,7 @@ function update(pkg)
end
else
stdout:printLn("Cloning " .. pkg.url)
result = (run:execute(GIT .. " clone --depth 1 --recurse-submodules " .. pkg.url) == 0)
result = (run:execute(GIT .. " clone --recurse-submodules " .. pkg.url) == 0)
if result and pkg.post_clone ~= nil then
stdout:printLn("Running post clone...")
run:pushd(name)
Expand All @@ -604,14 +605,21 @@ function update(pkg)
end
end

if pkg.hash ~= nil then
stdout:printLn("Checkout hash " .. pkg.hash .. "...")
run:pushd(name)
result = (run:execute(GIT .. " reset --hard " .. pkg.hash) == 0)
run:popd()
end

if not result then
stderr:printLn("GIT failed!")
return false
end

if pkg.patch ~= nil then
run:pushd(name)
stdout:printLn("Patching (" .. run.cwd .. ")...")
run:pushd(name)
pkg.patch()
run:popd()
end
Expand Down

0 comments on commit 4a7be00

Please sign in to comment.