Do not require Source Link info for VMR smoke tests (#16241)

This commit is contained in:
Přemek Vysoký 2023-04-26 11:10:53 +02:00 committed by GitHub
parent 1400493fc0
commit 4918bfbd81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,13 +114,15 @@ while :; do
shift shift
done done
GIT_DIR="$SCRIPT_ROOT/.git" # For build purposes, we need to make sure we have all the SourceLink information
if [ -f "$GIT_DIR/index" ]; then # We check for index because if outside of git, we create config and HEAD manually if [ "$alternateTarget" != "true" ]; then
GIT_DIR="$SCRIPT_ROOT/.git"
if [ -f "$GIT_DIR/index" ]; then # We check for index because if outside of git, we create config and HEAD manually
if [ -n "$sourceRepository" ] || [ -n "$sourceVersion" ] || [ -n "$releaseManifest" ]; then if [ -n "$sourceRepository" ] || [ -n "$sourceVersion" ] || [ -n "$releaseManifest" ]; then
echo "ERROR: Source Link arguments cannot be used in a git repository" echo "ERROR: Source Link arguments cannot be used in a git repository"
exit 1 exit 1
fi fi
else else
if [ -z "$releaseManifest" ]; then if [ -z "$releaseManifest" ]; then
if [ -z "$sourceRepository" ] || [ -z "$sourceVersion" ]; then if [ -z "$sourceRepository" ] || [ -z "$sourceVersion" ]; then
echo "ERROR: $SCRIPT_ROOT is not a git repository, either --release-manifest or --source-repository and --source-version must be specified" echo "ERROR: $SCRIPT_ROOT is not a git repository, either --release-manifest or --source-repository and --source-version must be specified"
@ -154,6 +156,7 @@ else
echo '[remote "origin"]' > "$GIT_DIR/config" echo '[remote "origin"]' > "$GIT_DIR/config"
echo "url=\"$sourceRepository\"" >> "$GIT_DIR/config" echo "url=\"$sourceRepository\"" >> "$GIT_DIR/config"
echo "$sourceVersion" > "$GIT_DIR/HEAD" echo "$sourceVersion" > "$GIT_DIR/HEAD"
fi
fi fi
if [ "$CUSTOM_PACKAGES_DIR" != "" ]; then if [ "$CUSTOM_PACKAGES_DIR" != "" ]; then