use fixed version and emulator reboots for now

This commit is contained in:
byte[] 2019-12-07 13:58:45 -05:00
parent 3981c7e1a7
commit 3e01162176
3 changed files with 11 additions and 7 deletions

View file

@ -4,7 +4,7 @@ defmodule Philomena.MixProject do
def project do
[
app: :philomena,
version: System.get_env("PHILOMENA_VERSION") || "0.1.0",
version: "0.1.0",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),

View file

@ -34,10 +34,14 @@ if git diff --name-only $oldrev $newrev | grep "^assets/"; then
mix phx.digest || die "assets compile failed"
fi
# Generate release name to always be the current timestamp so that
# it will be considered an upgrade
export PHILOMENA_VERSION="0.1.$(date +%s)"
# TODO: fix this when I can figure out how to avoid recompiling
# the entire project when the version changes
#
# # Generate release name to always be the current timestamp so that
# # it will be considered an upgrade
# export PHILOMENA_VERSION="0.1.$(date +%s)"
mix distillery.release --upgrade || die "failed to generate release"
echo "Building release"
mix distillery.release --quiet || die "failed to generate release"
_build/prod/rel/philomena/bin/philomena upgrade $PHILOMENA_VERSION || die "failed to upgrade app; log in to the server and restart the app manually"
_build/prod/rel/philomena/bin/philomena reboot || die "failed to upgrade app; log in to the server and restart the app manually"

View file

@ -50,7 +50,7 @@ end
# will be used by default
release :philomena do
set version: System.get_env("PHILOMENA_VERSION")
set version: current_version(:philomena)
set applications: [
:runtime_tools,
philomena: :permanent