mirror of
https://github.com/bitwarden/server.git
synced 2025-04-04 20:50:21 -05:00
Add support building from path that contains space (#815)
This commit is contained in:
parent
5892d52ed5
commit
aab6095073
50
build.sh
Normal file → Executable file
50
build.sh
Normal file → Executable file
@ -11,7 +11,7 @@ then
|
||||
|
||||
echo "Pushing Bitwarden ($TAG)"
|
||||
echo "========================"
|
||||
|
||||
|
||||
docker push bitwarden/api:$TAG
|
||||
docker push bitwarden/identity:$TAG
|
||||
docker push bitwarden/server:$TAG
|
||||
@ -26,9 +26,9 @@ then
|
||||
elif [ $# -gt 1 -a "$1" == "tag" ]
|
||||
then
|
||||
TAG=$2
|
||||
|
||||
|
||||
echo "Tagging Bitwarden as '$TAG'"
|
||||
|
||||
|
||||
docker tag bitwarden/api bitwarden/api:$TAG
|
||||
docker tag bitwarden/identity bitwarden/identity:$TAG
|
||||
docker tag bitwarden/server bitwarden/server:$TAG
|
||||
@ -44,36 +44,36 @@ else
|
||||
echo "Building Bitwarden"
|
||||
echo "=================="
|
||||
|
||||
chmod u+x $DIR/src/Api/build.sh
|
||||
$DIR/src/Api/build.sh
|
||||
chmod u+x "$DIR/src/Api/build.sh"
|
||||
"$DIR/src/Api/build.sh"
|
||||
|
||||
chmod u+x $DIR/src/Identity/build.sh
|
||||
$DIR/src/Identity/build.sh
|
||||
chmod u+x "$DIR/src/Identity/build.sh"
|
||||
"$DIR/src/Identity/build.sh"
|
||||
|
||||
chmod u+x $DIR/util/Server/build.sh
|
||||
$DIR/util/Server/build.sh
|
||||
chmod u+x "$DIR/util/Server/build.sh"
|
||||
"$DIR/util/Server/build.sh"
|
||||
|
||||
chmod u+x $DIR/util/Nginx/build.sh
|
||||
$DIR/util/Nginx/build.sh
|
||||
chmod u+x "$DIR/util/Nginx/build.sh"
|
||||
"$DIR/util/Nginx/build.sh"
|
||||
|
||||
chmod u+x $DIR/util/Attachments/build.sh
|
||||
$DIR/util/Attachments/build.sh
|
||||
chmod u+x "$DIR/util/Attachments/build.sh"
|
||||
"$DIR/util/Attachments/build.sh"
|
||||
|
||||
chmod u+x $DIR/src/Icons/build.sh
|
||||
$DIR/src/Icons/build.sh
|
||||
chmod u+x "$DIR/src/Icons/build.sh"
|
||||
"$DIR/src/Icons/build.sh"
|
||||
|
||||
chmod u+x $DIR/src/Notifications/build.sh
|
||||
$DIR/src/Notifications/build.sh
|
||||
chmod u+x "$DIR/src/Notifications/build.sh"
|
||||
"$DIR/src/Notifications/build.sh"
|
||||
|
||||
chmod u+x $DIR/src/Events/build.sh
|
||||
$DIR/src/Events/build.sh
|
||||
chmod u+x "$DIR/src/Events/build.sh"
|
||||
"$DIR/src/Events/build.sh"
|
||||
|
||||
chmod u+x $DIR/src/Admin/build.sh
|
||||
$DIR/src/Admin/build.sh
|
||||
chmod u+x "$DIR/src/Admin/build.sh"
|
||||
"$DIR/src/Admin/build.sh"
|
||||
|
||||
chmod u+x $DIR/util/MsSql/build.sh
|
||||
$DIR/util/MsSql/build.sh
|
||||
chmod u+x "$DIR/util/MsSql/build.sh"
|
||||
"$DIR/util/MsSql/build.sh"
|
||||
|
||||
chmod u+x $DIR/util/Setup/build.sh
|
||||
$DIR/util/Setup/build.sh
|
||||
chmod u+x "$DIR/util/Setup/build.sh"
|
||||
"$DIR/util/Setup/build.sh"
|
||||
fi
|
||||
|
@ -9,17 +9,17 @@ echo -e "\n## Building Admin"
|
||||
echo -e "\nBuilding app"
|
||||
echo ".NET Core version $(dotnet --version)"
|
||||
echo "Restore"
|
||||
dotnet restore $DIR/Admin.csproj
|
||||
dotnet restore "$DIR/Admin.csproj"
|
||||
echo "Clean"
|
||||
dotnet clean $DIR/Admin.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet clean "$DIR/Admin.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
echo "Node Build"
|
||||
cd $DIR
|
||||
cd "$DIR"
|
||||
npm install
|
||||
cd $CUR_DIR
|
||||
gulp --gulpfile $DIR/gulpfile.js build
|
||||
cd "$CUR_DIR"
|
||||
gulp --gulpfile "$DIR/gulpfile.js" build
|
||||
echo "Publish"
|
||||
dotnet publish $DIR/Admin.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet publish "$DIR/Admin.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
|
||||
echo -e "\nBuilding docker image"
|
||||
docker --version
|
||||
docker build -t bitwarden/admin $DIR/.
|
||||
docker build -t bitwarden/admin "$DIR/."
|
||||
|
@ -1,19 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && "pwd" )"
|
||||
|
||||
echo -e "\n## Building API"
|
||||
|
||||
echo -e "\nBuilding app"
|
||||
echo ".NET Core version $(dotnet --version)"
|
||||
echo "Restore"
|
||||
dotnet restore $DIR/Api.csproj
|
||||
dotnet restore "$DIR/Api.csproj"
|
||||
echo "Clean"
|
||||
dotnet clean $DIR/Api.csproj -c "Release" -o $DIR/obj/Docker/publish/Api
|
||||
dotnet clean "$DIR/Api.csproj" -c "Release" -o "$DIR/obj/Docker/publish/Api"
|
||||
echo "Publish"
|
||||
dotnet publish $DIR/Api.csproj -c "Release" -o $DIR/obj/Docker/publish/Api
|
||||
dotnet publish "$DIR/Api.csproj" -c "Release" -o "$DIR/obj/Docker/publish/Api"
|
||||
|
||||
echo -e "\nBuilding docker image"
|
||||
docker --version
|
||||
docker build -t bitwarden/api $DIR/.
|
||||
docker build -t bitwarden/api "$DIR/."
|
||||
|
8
src/Events/build.sh
Normal file → Executable file
8
src/Events/build.sh
Normal file → Executable file
@ -8,12 +8,12 @@ echo -e "\n## Building Events"
|
||||
echo -e "\nBuilding app"
|
||||
echo ".NET Core version $(dotnet --version)"
|
||||
echo "Restore"
|
||||
dotnet restore $DIR/Events.csproj
|
||||
dotnet restore "$DIR/Events.csproj"
|
||||
echo "Clean"
|
||||
dotnet clean $DIR/Events.csproj -c "Release" -o $DIR/obj/Docker/publish/Events
|
||||
dotnet clean "$DIR/Events.csproj" -c "Release" -o "$DIR/obj/Docker/publish/Events"
|
||||
echo "Publish"
|
||||
dotnet publish $DIR/Events.csproj -c "Release" -o $DIR/obj/Docker/publish/Events
|
||||
dotnet publish "$DIR/Events.csproj" -c "Release" -o "$DIR/obj/Docker/publish/Events"
|
||||
|
||||
echo -e "\nBuilding docker image"
|
||||
docker --version
|
||||
docker build -t bitwarden/events $DIR/.
|
||||
docker build -t bitwarden/events "$DIR/."
|
||||
|
@ -8,15 +8,15 @@ echo -e "\n## Building Event Processor"
|
||||
echo -e "\nBuilding app"
|
||||
echo ".NET Core version $(dotnet --version)"
|
||||
echo "Restore"
|
||||
dotnet restore $DIR/EventsProcessor.csproj
|
||||
dotnet restore "$DIR/EventsProcessor.csproj"
|
||||
echo "Clean"
|
||||
dotnet clean $DIR/EventsProcessor.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet clean "$DIR/EventsProcessor.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
echo "Publish"
|
||||
dotnet publish $DIR/EventsProcessor.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet publish "$DIR/EventsProcessor.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
|
||||
if [ "$1" != "nodocker" ]
|
||||
then
|
||||
echo -e "\nBuilding docker image"
|
||||
docker --version
|
||||
docker build -t bitwarden/icons $DIR/.
|
||||
docker build -t bitwarden/icons "$DIR/."
|
||||
fi
|
||||
|
@ -8,15 +8,15 @@ echo -e "\n## Building Icons"
|
||||
echo -e "\nBuilding app"
|
||||
echo ".NET Core version $(dotnet --version)"
|
||||
echo "Restore"
|
||||
dotnet restore $DIR/Icons.csproj
|
||||
dotnet restore "$DIR/Icons.csproj"
|
||||
echo "Clean"
|
||||
dotnet clean $DIR/Icons.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet clean "$DIR/Icons.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
echo "Publish"
|
||||
dotnet publish $DIR/Icons.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet publish "$DIR/Icons.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
|
||||
if [ "$1" != "nodocker" ]
|
||||
then
|
||||
echo -e "\nBuilding docker image"
|
||||
docker --version
|
||||
docker build -t bitwarden/icons $DIR/.
|
||||
docker build -t bitwarden/icons "$DIR/."
|
||||
fi
|
||||
|
@ -8,12 +8,12 @@ echo -e "\n## Building Identity"
|
||||
echo -e "\nBuilding app"
|
||||
echo ".NET Core version $(dotnet --version)"
|
||||
echo "Restore"
|
||||
dotnet restore $DIR/Identity.csproj
|
||||
dotnet restore "$DIR/Identity.csproj"
|
||||
echo "Clean"
|
||||
dotnet clean $DIR/Identity.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet clean "$DIR/Identity.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
echo "Publish"
|
||||
dotnet publish $DIR/Identity.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet publish "$DIR/Identity.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
|
||||
echo -e "\nBuilding docker image"
|
||||
docker --version
|
||||
docker build -t bitwarden/identity $DIR/.
|
||||
docker build -t bitwarden/identity "$DIR/."
|
||||
|
8
src/Notifications/build.sh
Normal file → Executable file
8
src/Notifications/build.sh
Normal file → Executable file
@ -8,15 +8,15 @@ echo -e "\n## Building Notifications"
|
||||
echo -e "\nBuilding app"
|
||||
echo ".NET Core version $(dotnet --version)"
|
||||
echo "Restore"
|
||||
dotnet restore $DIR/Notifications.csproj
|
||||
dotnet restore "$DIR/Notifications.csproj"
|
||||
echo "Clean"
|
||||
dotnet clean $DIR/Notifications.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet clean "$DIR/Notifications.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
echo "Publish"
|
||||
dotnet publish $DIR/Notifications.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet publish "$DIR/Notifications.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
|
||||
if [ "$1" != "nodocker" ]
|
||||
then
|
||||
echo -e "\nBuilding docker image"
|
||||
docker --version
|
||||
docker build -t bitwarden/notifications $DIR/.
|
||||
docker build -t bitwarden/notifications "$DIR/."
|
||||
fi
|
||||
|
@ -7,4 +7,4 @@ echo -e "\n## Building Attachments"
|
||||
|
||||
echo -e "\nBuilding docker image"
|
||||
docker --version
|
||||
docker build -t bitwarden/attachments $DIR/.
|
||||
docker build -t bitwarden/attachments "$DIR/."
|
||||
|
@ -7,4 +7,4 @@ echo -e "\n## Building MsSql"
|
||||
|
||||
echo -e "\nBuilding docker image"
|
||||
docker --version
|
||||
docker build -t bitwarden/mssql $DIR/.
|
||||
docker build -t bitwarden/mssql "$DIR/."
|
||||
|
@ -7,4 +7,4 @@ echo -e "\n## Building Nginx"
|
||||
|
||||
echo -e "\nBuilding docker image"
|
||||
docker --version
|
||||
docker build -t bitwarden/nginx $DIR/.
|
||||
docker build -t bitwarden/nginx "$DIR/."
|
||||
|
@ -8,12 +8,12 @@ echo -e "\n## Building Server"
|
||||
echo -e "\nBuilding app"
|
||||
echo ".NET Core version $(dotnet --version)"
|
||||
echo "Restore"
|
||||
dotnet restore $DIR/Server.csproj
|
||||
dotnet restore "$DIR/Server.csproj"
|
||||
echo "Clean"
|
||||
dotnet clean $DIR/Server.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet clean "$DIR/Server.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
echo "Publish"
|
||||
dotnet publish $DIR/Server.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet publish "$DIR/Server.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
|
||||
echo -e "\nBuilding docker image"
|
||||
docker --version
|
||||
docker build -t bitwarden/server $DIR/.
|
||||
docker build -t bitwarden/server "$DIR/."
|
||||
|
@ -8,12 +8,12 @@ echo -e "\n## Building Setup"
|
||||
echo -e "\nBuilding app"
|
||||
echo ".NET Core version $(dotnet --version)"
|
||||
echo "Restore"
|
||||
dotnet restore $DIR/Setup.csproj
|
||||
dotnet restore "$DIR/Setup.csproj"
|
||||
echo "Clean"
|
||||
dotnet clean $DIR/Setup.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet clean "$DIR/Setup.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
echo "Publish"
|
||||
dotnet publish $DIR/Setup.csproj -c "Release" -o $DIR/obj/Docker/publish
|
||||
dotnet publish "$DIR/Setup.csproj" -c "Release" -o "$DIR/obj/Docker/publish"
|
||||
|
||||
echo -e "\nBuilding docker image"
|
||||
docker --version
|
||||
docker build -t bitwarden/setup $DIR/.
|
||||
docker build -t bitwarden/setup "$DIR/."
|
||||
|
Loading…
x
Reference in New Issue
Block a user