mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Enable building arbitrary forks and branches
This commit is contained in:
1 parent
d76cc0f600
commit
ceed98e33d
5 files changed
+20
-2
No files matched your search
+10
-1
@@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [[ -z "$FORK" ]]; then
|
||||||
|
FORK=PowerShell
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$BRANCH" ]]; then
|
||||||
|
BRANCH=master
|
||||||
|
fi
|
||||||
|
|
||||||
# Build both sets by default
|
# Build both sets by default
|
||||||
if [[ -z "$BUILDS" ]]; then
|
if [[ -z "$BUILDS" ]]; then
|
||||||
BUILDS="stable unstable"
|
BUILDS="stable unstable"
|
||||||
@@ -20,9 +28,10 @@ for build in $BUILDS; do
|
|||||||
# copy the common script because it lives outside the docker build context
|
# copy the common script because it lives outside the docker build context
|
||||||
if [[ "$build" = "unstable" ]]; then
|
if [[ "$build" = "unstable" ]]; then
|
||||||
cp bootstrap.ps1 $distro
|
cp bootstrap.ps1 $distro
|
||||||
|
buildargs="--build-arg fork=$FORK --build-arg branch=$BRANCH"
|
||||||
fi
|
fi
|
||||||
# build and tag the image so they can be derived from
|
# build and tag the image so they can be derived from
|
||||||
docker build -t powershell/powershell:$build-$distro $distro
|
docker build $buildargs -t powershell/powershell:$build-$distro $distro
|
||||||
done
|
done
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# This is intended to be used inside Docker containers
|
# This is intended to be used inside Docker containers
|
||||||
|
|
||||||
git clone --recursive https://github.com/PowerShell/PowerShell.git
|
git clone --recursive https://github.com/$env:fork/PowerShell.git -b $env:branch
|
||||||
Set-Location PowerShell
|
Set-Location PowerShell
|
||||||
Import-Module ./build.psm1
|
Import-Module ./build.psm1
|
||||||
Start-PSBootstrap -Package -NoSudo
|
Start-PSBootstrap -Package -NoSudo
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
FROM powershell/powershell:stable-centos7
|
FROM powershell/powershell:stable-centos7
|
||||||
MAINTAINER Andrew Schwartzmeyer <andschwa@microsoft.com>
|
MAINTAINER Andrew Schwartzmeyer <andschwa@microsoft.com>
|
||||||
|
|
||||||
|
ARG fork=PowerShell
|
||||||
|
ARG branch=master
|
||||||
|
|
||||||
COPY bootstrap.ps1 /
|
COPY bootstrap.ps1 /
|
||||||
RUN powershell -f bootstrap.ps1 \
|
RUN powershell -f bootstrap.ps1 \
|
||||||
&& yum install -y PowerShell/powershell*.rpm
|
&& yum install -y PowerShell/powershell*.rpm
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
FROM powershell/powershell:stable-ubuntu14.04
|
FROM powershell/powershell:stable-ubuntu14.04
|
||||||
MAINTAINER Andrew Schwartzmeyer <andschwa@microsoft.com>
|
MAINTAINER Andrew Schwartzmeyer <andschwa@microsoft.com>
|
||||||
|
|
||||||
|
ARG fork=PowerShell
|
||||||
|
ARG branch=master
|
||||||
|
|
||||||
COPY bootstrap.ps1 /
|
COPY bootstrap.ps1 /
|
||||||
RUN powershell -f bootstrap.ps1 \
|
RUN powershell -f bootstrap.ps1 \
|
||||||
&& dpkg -i PowerShell/powershell*.deb
|
&& dpkg -i PowerShell/powershell*.deb
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
FROM powershell/powershell:stable-ubuntu16.04
|
FROM powershell/powershell:stable-ubuntu16.04
|
||||||
MAINTAINER Andrew Schwartzmeyer <andschwa@microsoft.com>
|
MAINTAINER Andrew Schwartzmeyer <andschwa@microsoft.com>
|
||||||
|
|
||||||
|
ARG fork=PowerShell
|
||||||
|
ARG branch=master
|
||||||
|
|
||||||
COPY bootstrap.ps1 /
|
COPY bootstrap.ps1 /
|
||||||
RUN powershell -f bootstrap.ps1 \
|
RUN powershell -f bootstrap.ps1 \
|
||||||
&& dpkg -i PowerShell/powershell*.deb
|
&& dpkg -i PowerShell/powershell*.deb
|
||||||
Reference in new issue
Block a user