Use makepkg's options instead of moving stuff around
This commit is contained in:
parent
d9d6b0f886
commit
2a1ed4b054
1 changed files with 8 additions and 6 deletions
14
makepkg.sh
14
makepkg.sh
|
@ -4,11 +4,14 @@ set -e
|
|||
|
||||
echo "Building on: $DRONE_STAGE_MACHINE"
|
||||
|
||||
sudo chown -R builder:builder "$DRONE_WORKSPACE_BASE"
|
||||
|
||||
AUR_URL="https://aur.archlinux.org"
|
||||
OUTDIR="$DRONE_WORKSPACE_BASE/out"
|
||||
mkdir -p "$OUTDIR"
|
||||
sudo chown -R builder:builder "$OUTDIR"
|
||||
|
||||
export PKGDEST="$OUTDIR"
|
||||
export SRCDEST="$HOME"
|
||||
export BUILDDIR="$HOME"
|
||||
|
||||
if [ "$PLUGIN_AUTO_MAKEFLAGS" != "no" ]; then
|
||||
echo "MAKEFLAGS='-j$(nproc)'" | sudo tee -a /etc/makepkg.conf
|
||||
|
@ -27,10 +30,12 @@ fi
|
|||
# Clone package repo
|
||||
if [ "$PLUGIN_AUR" != "" ]; then
|
||||
echo "Building AUR package: $PLUGIN_AUR"
|
||||
cd ~
|
||||
git clone "$AUR_URL/$PLUGIN_AUR.git" package
|
||||
cd package
|
||||
elif [ "$PLUGIN_REPO" != "" ]; then
|
||||
echo "Building package from git repository: $PLUGIN_REPO"
|
||||
cd ~
|
||||
git clone "$PLUGIN_REPO" package
|
||||
cd package
|
||||
else
|
||||
|
@ -46,7 +51,4 @@ fi
|
|||
echo "Running build"
|
||||
makepkg -sAc --skippgpcheck --noconfirm --noprogressbar "$PKGBUILD"
|
||||
|
||||
echo "Moving packages to output directory: $OUTDIR"
|
||||
mv *.pkg.* "$OUTDIR/"
|
||||
|
||||
sudo chown -R root:root "$DRONE_WORKSPACE_BASE"
|
||||
sudo chown -R root:root "$OUTDIR"
|
||||
|
|
Loading…
Reference in a new issue