Skip to content

Instantly share code, notes, and snippets.

@lbussell
Created July 13, 2022 17:08
Show Gist options
  • Save lbussell/2187566a9d1245ea2f7e36ec61efb8c4 to your computer and use it in GitHub Desktop.
Save lbussell/2187566a9d1245ea2f7e36ec61efb8c4 to your computer and use it in GitHub Desktop.
Rebuild a repo in a source-build tarball with an accurate repo-level prebuilt report
#!/bin/bash
set -euxo pipefail
# Example: ./rebuild.sh msbuild
semaphores=(
"CreateBuildOutputProps.complete",
"CreateCombinedRestoreSourceAndVersionProps.complete",
"UpdateNuGetConfig.complete",
"CopyPackage.complete",
"Build.complete",
)
semaphore_path="artifacts/obj/semaphores/$1/"
for semaphore in "${semaphores}"
do
rm -rf "${semaphore_path}${semaphore}"
done
rm -rf "src/$1/artifacts/source-build/self/package-cache/*"
./build.sh --online
cat "src/$1/artifacts/source-build/self/prebuilt-report/annotated-usage.xml"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment