Skip to content

Commit

Permalink
Merge branch '3.3.5' into npcbots_3.3.5
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/README.md
  • Loading branch information
trickerer committed Sep 16, 2023
2 parents 35c7557 + edaf38c commit aef631e
Show file tree
Hide file tree
Showing 38 changed files with 2,520 additions and 767 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cpp-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
strategy:
fail-fast: false
runs-on: ubuntu-22.04
if: github.repository == 'azerothcore/azerothcore-wotlk'
name: cpp check
steps:
- uses: actions/checkout@v3
Expand Down
27 changes: 20 additions & 7 deletions .github/workflows/import_pending.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,34 @@ jobs:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Extract branch name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
# If we're fetching all the history in a later step it makes sense to
# pre-load it now
fetch-depth: 0
ref: ${{ github.ref_name }}

- uses: denoland/setup-deno@v1
with:
# Specifies latest 1.x
deno-version: "~1.0"

- name: Import and commit pending sql
run: |
git config user.email "[email protected]" && git config user.name "AzerothCoreBot"
# Get the latest changes from git
git pull --rebase origin "${{ github.ref_name }}"
bash bin/acore-db-pendings
bash bin/acore-import-changelogs
git fetch --unshallow origin ${BRANCH}
deno run --allow-all --unstable apps/ci/ci-pending-changelogs.ts
git add -A .
git commit -am "chore(DB): import pending files" -m "Referenced commit(s): ${GITHUB_SHA}" || true
env:
BRANCH: ${{ steps.extract_branch.outputs.branch }}
# Noting that the branch name can only be master, as per the event
# triggering this action
BRANCH: ${{ github.ref_name }}

- name: Push changes
uses: ad-m/github-push-action@fe38f0a751bf9149f0270cc1fe20bf9156854365
with:
github_token: ${{ secrets.AC_GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}
# Noting that the branch name can only be master, as per the event
# triggering this action
branch: ${{ github.ref_name }}
2 changes: 1 addition & 1 deletion .github/workflows/windows_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
env:
BOOST_ROOT: C:\local\boost_1_79_0
BOOST_ROOT: C:\local\boost_1_82_0
if: |
github.repository == 'azerothcore/azerothcore-wotlk'
&& !github.event.pull_request.draft
Expand Down
23 changes: 0 additions & 23 deletions apps/bash_shared/deno.sh

This file was deleted.

5 changes: 0 additions & 5 deletions apps/bash_shared/includes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,4 @@ source "$AC_PATH_DEPS/acore/bash-lib/src/event/hooks.sh"

source "$AC_PATH_SHARED/common.sh"

source "$AC_PATH_SHARED/deno.sh"

denoInstall

[[ "$OSTYPE" = "msys" ]] && AC_BINPATH_FULL="$BINPATH" || AC_BINPATH_FULL="$BINPATH/bin"

2 changes: 1 addition & 1 deletion apps/compiler/includes/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function comp_configure() {
echo "Platform: $OSTYPE"
case "$OSTYPE" in
darwin*)
OSOPTIONS=" -DMYSQL_ADD_INCLUDE_PATH=/usr/local/include -DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.dylib -DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include -DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@1.1/include -DOPENSSL_SSL_LIBRARIES=/usr/local/opt/openssl@1.1/lib/libssl.dylib -DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/openssl@1.1/lib/libcrypto.dylib "
OSOPTIONS=" -DMYSQL_ADD_INCLUDE_PATH=/usr/local/include -DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.dylib -DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include -DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@3/include -DOPENSSL_SSL_LIBRARIES=/usr/local/opt/openssl@3/lib/libssl.dylib -DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/openssl@3/lib/libcrypto.dylib "
;;
msys*)
OSOPTIONS=" -DMYSQL_INCLUDE_DIR=C:\tools\mysql\current\include -DMYSQL_LIBRARY=C:\tools\mysql\current\lib\mysqlclient.lib "
Expand Down
184 changes: 184 additions & 0 deletions apps/docker/docker-cmd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
#!/bin/bash

# TODO(michaeldelago) decide if we need a wrapper like this around docker
# commands.
#
# Running the docker commands should be simple and familiar.
# Introducting extra steps through the dashboard can cause issues with people
# getting started, especially if they already know docker.
#
# If a new user knows docker, they will feel (pretty close) to right at home.
# If a new user doesn't know docker, it's easy to learn and the knowledge
# applies to much more than azerothcore

set -euo pipefail

COMPOSE_DOCKER_CLI_BUILD="1"
DOCKER_BUILDKIT="1"
# BUILDKIT_INLINE_CACHE="1"

function usage () {
cat <<EOF
Wrapper for shell scripts around docker
usage: $(basename $0) ACTION [ ACTION... ] [ ACTION_ARG... ]
actions:
EOF
# the `-s` will remove the "#" and properly space the action and description
cat <<EOF | column -t -l2 -s'#'
> start:app # Start the development worldserver and authserver
> start:app:d # Start the development worldserver and authserver in detached mode
> build # build the development worldserver and authserver
> pull # pull the development worldserver and authserver
> build:nocache # build the development worldserver and authserver without cache
> clean:build # clean build artifacts from the dev server
> client-data # download client data in the dev server
> dev:up start # the dev server
> dev:build # compile azerothcore using the dev server
> dev:dash # execute the dashboard in the dev server container
> dev:shell [ ARGS... ] # open a bash shell in the dev server
> prod:build # Build the service containers used by acore-docker
> prod:pull # Pull the containers used by acore-docker
> prod:up # Start the services used by acore-docker
> prod:up:d # start the services used by acore-docker in the background
> attach SERVICE # attach to a service currently running in docker compose
EOF
}

# If no args, just spit usage and exit
[[ $# -eq 0 ]] && usage && exit

# loop through commands passed
while [[ $# -gt 0 ]]; do
case "$1" in
start:app)
set -x
docker compose --profile app up
set +x
# pop the head off of the queue of args
# After this, the value of $1 is the value of $2
shift
;;

start:app:d)
set -x
docker compose --profile app up -d
set +x
shift
;;

build)
set -x
docker compose --profile local --profile dev --profile dev-build build
docker compose --profile dev-build run --rm --no-deps ac-dev-build /bin/bash /azerothcore/apps/docker/docker-build-dev.sh
set +x
shift
;;

pull)
set -x
docker compose --profile local --profile dev --profile dev-build pull
docker image prune -f
set +x
shift
;;

build:nocache)
set -x
docker compose --profile local --profile dev --profile dev-build build --no-cache
docker image prune -f
docker compose run --rm --no-deps ac-dev-build /bin/bash /azerothcore/apps/docker/docker-build-dev.sh
set +x
shift
;;

clean:build)
set -x
docker image prune -f
docker compose run --rm --no-deps ac-dev-server bash acore.sh compiler clean
docker compose run --rm --no-deps ac-dev-server bash acore.sh compiler ccacheClean
set +x
shift
;;

client-data)
set -x
docker compose run --rm --no-deps ac-dev-server bash acore.sh client-data
set +x
shift
;;

dev:up)
set -x
docker compose up -d ac-dev-server
set +x
shift
;;

dev:build)
set -x
docker compose run --rm ac-dev-server bash acore.sh compiler build
set +x
shift
;;

dev:dash)
set -x
docker compose run --rm ac-dev-server bash /azerothcore/acore.sh ${@:2}
set +x
shift
;;

dev:shell)
set -x
docker compose up -d ac-dev-server
docker compose exec ac-dev-server bash ${@:2}
set +x
shift
;;

build:prod|prod:build)
set -x
docker compose --profile prod build
docker image prune -f
set +x
shift
;;

pull:prod|prod:pull)
set -x
docker compose --profile prod pull
set +x
shift
;;

prod:up|start:prod)
set -x
docker compose --profile prod-app up
set +x
shift
;;

prod:up:d|start:prod:d)
set -x
docker compose --profile prod-app up -d
set +x
shift
;;

attach)
SERVICE="$2"
set -x
docker compose attach "$SERVICE"
set +x
shift
shift # Second to pass the argument
;;

*)
echo "Unknown or empty arg"
usage
exit 1
esac
done
Loading

0 comments on commit aef631e

Please sign in to comment.