Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

build-source: Add support for debian/watch and depricate ubports.source_location #76

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions build-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,30 @@ export GIT_COMMIT
export GIT_BRANCH="$BRANCH_NAME"
cd ..

source_format=$(cat source/debian/source/format)
if [[ $source_format != 3.0* ]]; then
echo "WARNING: Please upgrade debian source format to 3.0"
fi

source_location_file=$(sourcedebian_or_source ubports.source_location)
if [ -n "$source_location_file" ]; then
echo "WARNING: ubports.source_location file is deprecated, please use debian/watch file"
while read -r SOURCE_URL && read -r SOURCE_FILENAME; do
if [ -f "$SOURCE_FILENAME" ]; then
rm "$SOURCE_FILENAME"
fi

wget -O "$SOURCE_FILENAME" "$SOURCE_URL"
done <"$source_location_file"
is_quilt=1;
elif [[ $source_format == "3.0 (quilt)" ]]; then
cd source
uscan --noconf --force-download --rename --download-current-version --destdir=..
mariogrip marked this conversation as resolved.
Show resolved Hide resolved
cd ..
is_quilt=1;
fi

if [ -n "$is_quilt" ]; then
export IGNORE_GIT_BUILDPACKAGE=true
# FIXME: This relies on UBports-specific change to generate-git-snapshot.
# Maybe using PRE_SOURCE_HOOK, but it accepts shell script file path and
Expand Down