mirror of
https://github.com/bitwarden/server.git
synced 2025-01-25 22:21:38 +01:00
Remove old unused scripts (#5202)
This commit is contained in:
parent
144c0a2fee
commit
bc40884db0
@ -1,3 +0,0 @@
|
|||||||
$scriptPath = $MyInvocation.MyCommand.Path
|
|
||||||
Invoke-RestMethod -OutFile $scriptPath -Uri "https://go.btwrdn.co/bw-ps"
|
|
||||||
Write-Output "We have moved our self-hosted scripts to their own repository (https://github.com/bitwarden/self-host). Your 'bitwarden.ps1' script has been automatically upgraded. Please run it again."
|
|
@ -1,31 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cat << "EOF"
|
|
||||||
_ _ _ _
|
|
||||||
| |__ (_) |___ ____ _ _ __ __| | ___ _ __
|
|
||||||
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \
|
|
||||||
| |_) | | |_ \ V V / (_| | | | (_| | __/ | | |
|
|
||||||
|_.__/|_|\__| \_/\_/ \__,_|_| \__,_|\___|_| |_|
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat << EOF
|
|
||||||
Open source password management solutions
|
|
||||||
Copyright 2015-$(date +'%Y'), 8bit Solutions LLC
|
|
||||||
https://bitwarden.com, https://github.com/bitwarden
|
|
||||||
===================================================
|
|
||||||
EOF
|
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
SCRIPT_NAME=$(basename "$0")
|
|
||||||
SCRIPT_PATH="$DIR/$SCRIPT_NAME"
|
|
||||||
BITWARDEN_SCRIPT_URL="https://go.btwrdn.co/bw-sh"
|
|
||||||
|
|
||||||
if curl -L -s -w "http_code %{http_code}" -o $SCRIPT_PATH.1 $BITWARDEN_SCRIPT_URL | grep -q "^http_code 20[0-9]"
|
|
||||||
then
|
|
||||||
mv $SCRIPT_PATH.1 $SCRIPT_PATH
|
|
||||||
chmod u+x $SCRIPT_PATH
|
|
||||||
echo "We have moved our self-hosted scripts to their own repository (https://github.com/bitwarden/self-host). Your 'bitwarden.sh' script has been automatically upgraded. Please run it again."
|
|
||||||
else
|
|
||||||
rm -f $SCRIPT_PATH.1
|
|
||||||
fi
|
|
@ -1,47 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
##############################
|
|
||||||
# Builds a specified service
|
|
||||||
# Arguments:
|
|
||||||
# 1: Project to build
|
|
||||||
# 2: Project path
|
|
||||||
##############################
|
|
||||||
build() {
|
|
||||||
local project=$1
|
|
||||||
local project_dir=$2
|
|
||||||
|
|
||||||
echo "Building $project"
|
|
||||||
echo "Build Path: $project_dir"
|
|
||||||
echo "=================="
|
|
||||||
|
|
||||||
chmod u+x "$project_dir/build.sh"
|
|
||||||
"$project_dir/build.sh"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get Project
|
|
||||||
PROJECT=$1; shift
|
|
||||||
|
|
||||||
case "$PROJECT" in
|
|
||||||
"admin" | "Admin") build Admin $PWD/src/Admin ;;
|
|
||||||
"api" | "Api") build Api $PWD/src/Api ;;
|
|
||||||
"billing" | "Billing") build Billing $PWD/src/Billing ;;
|
|
||||||
"events" | "Events") build Events $PWD/src/Events ;;
|
|
||||||
"eventsprocessor" | "EventsProcessor") build EventsProcessor $PWD/src/EventsProcessor ;;
|
|
||||||
"icons" | "Icons") build Icons $PWD/src/Icons ;;
|
|
||||||
"identity" | "Identity") build Identity $PWD/src/Identity ;;
|
|
||||||
"notifications" | "Notifications") build Notifications $PWD/src/Notifications ;;
|
|
||||||
"server" | "Server") build Server $PWD/util/Server ;;
|
|
||||||
"sso" | "Sso") build Sso $PWD/bitwarden_license/src/Sso ;;
|
|
||||||
"")
|
|
||||||
build Admin $PWD/src/Admin
|
|
||||||
build Api $PWD/src/Api
|
|
||||||
build Billing $PWD/src/Billing
|
|
||||||
build Events $PWD/src/Events
|
|
||||||
build EventsProcessor $PWD/src/EventsProcessor
|
|
||||||
build Icons $PWD/src/Icons
|
|
||||||
build Identity $PWD/src/Identity
|
|
||||||
build Notifications $PWD/src/Notifications
|
|
||||||
build Server $PWD/util/Server
|
|
||||||
build Sso $PWD/bitwarden_license/src/Sso
|
|
||||||
;;
|
|
||||||
esac
|
|
@ -1,88 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
##############################
|
|
||||||
# Builds the docker image from a pre-built build directory
|
|
||||||
# Arguments:
|
|
||||||
# 1: Project Name
|
|
||||||
# 2: Project Directory
|
|
||||||
# 3: Docker Tag
|
|
||||||
# 4: Docker push
|
|
||||||
# Outputs:
|
|
||||||
# Output to STDOUT or STDERR.
|
|
||||||
# Returns:
|
|
||||||
# Returned values other than the default exit status of the last command run.
|
|
||||||
##############################
|
|
||||||
docker_build() {
|
|
||||||
local project_name=$1
|
|
||||||
local project_dir=$2
|
|
||||||
local docker_tag=$3
|
|
||||||
local docker_push=$4
|
|
||||||
|
|
||||||
local project_name_lower=$(echo "$project_name" | awk '{print tolower($0)}')
|
|
||||||
|
|
||||||
echo "Building docker image: bitwarden/$project_name_lower:$docker_tag"
|
|
||||||
echo "=============================="
|
|
||||||
docker build -t bitwarden/$project_name_lower:$docker_tag $project_dir
|
|
||||||
|
|
||||||
if [ "$docker_push" == "1" ]; then
|
|
||||||
docker push bitwarden/$project_name_lower:$docker_tag
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get Project
|
|
||||||
PROJECT=$1; shift
|
|
||||||
|
|
||||||
# Get Params
|
|
||||||
TAG="latest"
|
|
||||||
PUSH=0
|
|
||||||
|
|
||||||
while [ ! $# -eq 0 ]; do
|
|
||||||
case "$1" in
|
|
||||||
-t | --tag)
|
|
||||||
if [[ $2 ]]; then
|
|
||||||
TAG="$2"
|
|
||||||
shift
|
|
||||||
else
|
|
||||||
exp "--tag requires a value"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
--push) PUSH=1 ;;
|
|
||||||
-h | --help ) usage && exit ;;
|
|
||||||
*) usage && exit ;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
case "$PROJECT" in
|
|
||||||
"admin" | "Admin") docker_build Admin $PWD/src/Admin $TAG $PUSH ;;
|
|
||||||
"api" | "Api") docker_build Api $PWD/src/Api $TAG $PUSH ;;
|
|
||||||
"attachments" | "Attachments") docker_build Attachments $PWD/util/Attachments $TAG $PUSH ;;
|
|
||||||
#"billing" | "Billing") docker_build Billing $PWD/src/Billing $TAG $PUSH ;;
|
|
||||||
"events" | "Events") docker_build Events $PWD/src/Events $TAG $PUSH ;;
|
|
||||||
"eventsprocessor" | "EventsProcessor") docker_build EventsProcessor $PWD/src/EventsProcessor $TAG $PUSH ;;
|
|
||||||
"icons" | "Icons") docker_build Icons $PWD/src/Icons $TAG $PUSH ;;
|
|
||||||
"identity" | "Identity") docker_build Identity $PWD/src/Identity $TAG $PUSH ;;
|
|
||||||
"mssql" | "MsSql" | "Mssql") docker_build MsSql $PWD/util/MsSql $TAG $PUSH ;;
|
|
||||||
"nginx" | "Nginx") docker_build Nginx $PWD/util/Nginx $TAG $PUSH ;;
|
|
||||||
"notifications" | "Notifications") docker_build Notifications $PWD/src/Notifications $TAG $PUSH ;;
|
|
||||||
"server" | "Server") docker_build Server $PWD/util/Server $TAG $PUSH ;;
|
|
||||||
"setup" | "Setup") docker_build Setup $PWD/util/Setup $TAG $PUSH ;;
|
|
||||||
"sso" | "Sso") docker_build Sso $PWD/bitwarden_license/src/Sso $TAG $PUSH ;;
|
|
||||||
"")
|
|
||||||
docker_build Admin $PWD/src/Admin $TAG $PUSH
|
|
||||||
docker_build Api $PWD/src/Api $TAG $PUSH
|
|
||||||
docker_build Attachments $PWD/util/Attachments $TAG $PUSH
|
|
||||||
#docker_build Billing $PWD/src/Billing $TAG $PUSH
|
|
||||||
docker_build Events $PWD/src/Events $TAG $PUSH
|
|
||||||
docker_build EventsProcessor $PWD/src/EventsProcessor $TAG $PUSH
|
|
||||||
docker_build Icons $PWD/src/Icons $TAG $PUSH
|
|
||||||
docker_build Identity $PWD/src/Identity $TAG $PUSH
|
|
||||||
docker_build MsSql $PWD/util/MsSql $TAG $PUSH
|
|
||||||
docker_build Nginx $PWD/util/Nginx $TAG $PUSH
|
|
||||||
docker_build Notifications $PWD/src/Notifications $TAG $PUSH
|
|
||||||
docker_build Server $PWD/util/Server $TAG $PUSH
|
|
||||||
docker_build Setup $PWD/util/Setup $TAG $PUSH
|
|
||||||
docker_build Sso $PWD/bitwarden_license/src/Sso $TAG $PUSH
|
|
||||||
;;
|
|
||||||
esac
|
|
@ -1,42 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
##############################
|
|
||||||
# Builds the docker image from a pre-built build directory
|
|
||||||
# Arguments:
|
|
||||||
# 1: Project Name
|
|
||||||
# 2: Project Directory
|
|
||||||
# 3: Docker Tag
|
|
||||||
# 4: Docker push
|
|
||||||
##############################
|
|
||||||
deploy_app_service() {
|
|
||||||
local project_name=$1
|
|
||||||
local project_dir=$2
|
|
||||||
|
|
||||||
local project_name_lower=$(echo "$project_name" | awk '{print tolower($0)}')
|
|
||||||
local webapp_name=$(az keyvault secret show --vault-name bitwarden-qa-kv --name appservices-$project_name_lower-webapp-name --query value --output tsv)
|
|
||||||
|
|
||||||
cd $project_dir/obj/build-output/publish
|
|
||||||
zip -r $project_name.zip .
|
|
||||||
mv $project_name.zip ../../../
|
|
||||||
#az webapp deploy --resource-group bw-qa-env --name $webapp_name \
|
|
||||||
# --src-path $project_name.zip --verbose --type zip --restart true --subscription "Bitwarden Test"
|
|
||||||
}
|
|
||||||
|
|
||||||
PROJECT=$1; shift
|
|
||||||
|
|
||||||
case "$PROJECT" in
|
|
||||||
"api" | "Api") deploy_app_service Api $PWD/src/Api ;;
|
|
||||||
"admin" | "Admin") deploy_app_service Admin $PWD/src/Admin ;;
|
|
||||||
"identity" | "Identity") deploy_app_service Identity $PWD/src/Identity ;;
|
|
||||||
"events" | "Events") deploy_app_service Events $PWD/src/Events ;;
|
|
||||||
"billing" | "Billing") deploy_app_service Billing $PWD/src/Billing ;;
|
|
||||||
"sso" | "Sso") deploy_app_service Sso $PWD/bitwarden_license/src/Sso ;;
|
|
||||||
"")
|
|
||||||
deploy_app_service Api $PWD/src/Api
|
|
||||||
deploy_app_service Admin $PWD/src/Admin
|
|
||||||
deploy_app_service Identity $PWD/src/Identity
|
|
||||||
deploy_app_service Events $PWD/src/Events
|
|
||||||
deploy_app_service Billing $PWD/src/Billing
|
|
||||||
deploy_app_service Sso $PWD/bitwarden_license/src/Sso
|
|
||||||
;;
|
|
||||||
esac
|
|
@ -1,16 +0,0 @@
|
|||||||
$scriptPath = $MyInvocation.MyCommand.Path
|
|
||||||
$bitwardenPath = Split-Path $scriptPath | Split-Path | Split-Path
|
|
||||||
$files = Get-ChildItem $bitwardenPath
|
|
||||||
$scriptFound = $false
|
|
||||||
foreach ($file in $files) {
|
|
||||||
if ($file.Name -eq "bitwarden.ps1") {
|
|
||||||
$scriptFound = $true
|
|
||||||
Invoke-RestMethod -OutFile "$($bitwardenPath)/bitwarden.ps1" -Uri "https://go.btwrdn.co/bw-ps"
|
|
||||||
Write-Output "We have moved our self-hosted scripts to their own repository (https://github.com/bitwarden/self-host). Your 'bitwarden.ps1' script has been automatically upgraded. Please run it again."
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (-not $scriptFound) {
|
|
||||||
Write-Output "We have moved our self-hosted scripts to their own repository (https://github.com/bitwarden/self-host). Please run 'bitwarden.ps1 -updateself' before updating."
|
|
||||||
}
|
|
@ -1,45 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cat << "EOF"
|
|
||||||
_ _ _ _
|
|
||||||
| |__ (_) |___ ____ _ _ __ __| | ___ _ __
|
|
||||||
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \
|
|
||||||
| |_) | | |_ \ V V / (_| | | | (_| | __/ | | |
|
|
||||||
|_.__/|_|\__| \_/\_/ \__,_|_| \__,_|\___|_| |_|
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat << EOF
|
|
||||||
Open source password management solutions
|
|
||||||
Copyright 2015-$(date +'%Y'), 8bit Solutions LLC
|
|
||||||
https://bitwarden.com, https://github.com/bitwarden
|
|
||||||
===================================================
|
|
||||||
EOF
|
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
BITWARDEN_SCRIPT_URL="https://go.btwrdn.co/bw-sh"
|
|
||||||
|
|
||||||
cd $DIR
|
|
||||||
cd ../../
|
|
||||||
|
|
||||||
FOUND=false
|
|
||||||
|
|
||||||
for i in *.sh; do
|
|
||||||
if [ $i = "bitwarden.sh" ]
|
|
||||||
then
|
|
||||||
FOUND=true
|
|
||||||
if curl -L -s -w "http_code %{http_code}" -o bitwarden.sh.1 $BITWARDEN_SCRIPT_URL | grep -q "^http_code 20[0-9]"
|
|
||||||
then
|
|
||||||
mv bitwarden.sh.1 bitwarden.sh
|
|
||||||
chmod u+x bitwarden.sh
|
|
||||||
echo "We have moved our self-hosted scripts to their own repository (https://github.com/bitwarden/self-host). Your 'bitwarden.sh' script has been automatically upgraded. Please run it again."
|
|
||||||
else
|
|
||||||
rm -f bitwarden.sh.1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ $FOUND = false ]
|
|
||||||
then
|
|
||||||
echo "We have moved our self-hosted scripts to their own repository (https://github.com/bitwarden/self-host). Please run 'bitwarden.sh updateself' before updating."
|
|
||||||
fi
|
|
Loading…
Reference in New Issue
Block a user