Skip to content

Commit

Permalink
Merge pull request #223 from Beherith/master
Browse files Browse the repository at this point in the history
Update build script
  • Loading branch information
Beherith authored Mar 12, 2024
2 parents 1e1b4e7 + 1a35643 commit fc0e310
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions bin/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

set -e
echo "Starting release process..."
cd /opt/build
rm -rf /opt/build/_build/prod/rel/teiserver/releases

echo "Creating release artifact directory..."
mkdir -p /opt/build/rel/artifacts

echo "Installing rebar and hex..."
mix local.rebar --force
mix local.hex --if-missing --force

echo "Fetching project deps..."
mix deps.get

echo "Cleaning and compiling..."
# "If you are using Phoenix, here is where you would run mix phx.digest"
mix phx.digest

echo "Generating release..."
mix release

echo "Creating tarball..."
tar -zcf "/opt/build/rel/artifacts/teiserver.tar.gz" /opt/build/_build/prod

echo "Release generated at rel/artifacts/teiserver.tar.gz"
exit 0
2 changes: 1 addition & 1 deletion documents/prod_files/Dockerfile_debian
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ ENV LANG=en_US.UTF-8 \
MIX_ENV=$env
WORKDIR /opt/build
ADD ./bin/build ./bin/build
RUN chmod +wrx /bin/build
RUN chmod +wrx ./bin/build
CMD ["bin/build"]

0 comments on commit fc0e310

Please sign in to comment.