Skip to content

Commit

Permalink
Update build scripts with the new arguments
Browse files Browse the repository at this point in the history
- Update variable names, because no 'ESL package' is used now
- Pass the builder and target image names to 'docker build'
  • Loading branch information
chrzaszcz committed Oct 30, 2024
1 parent ce59688 commit e1cddd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions tools/pkg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ for (( i = 0; i < $len - 1; i++ )); do
i=$((i+1))
done

dockerfile_platform=${platform/_/:}
builder_image="erlangsolutions/erlang:${platform}-${erlang_version}"
target_image="${platform/-/:}"
docker build -t mongooseim-${platform}:${version}-${revision} \
--build-arg dockerfile_platform=${dockerfile_platform} \
--build-arg builder_image=${builder_image} \
--build-arg target_image=${target_image} \
--build-arg version=${version} \
--build-arg revision=${revision} \
--build-arg erlang_version=${erlang_version} \
Expand Down
6 changes: 3 additions & 3 deletions tools/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ build_pkg () {
cd tools/pkg

local platform=$1
local esl_erlang_pkg_vsn=$2
local erlang_version=$2
local project_root=$(git rev-parse --show-toplevel)

if [[ $platform == rockylinux* ]] || [[ $platform == almalinux* ]]; then
Expand All @@ -302,7 +302,7 @@ build_pkg () {
--platform $platform \
--version $version \
--revision $revision \
--erlang_version $esl_erlang_pkg_vsn \
--erlang_version $erlang_version \
--dockerfile_path "$project_root/tools/pkg/$dockerfile_name" \
--context_path $project_root \
--built_packages_directory "$project_root/tools/pkg/packages"
Expand Down Expand Up @@ -331,7 +331,7 @@ elif [ "$PRESET" == "edoc_only" ]; then
tools/print-dots.sh stop
exit ${RESULT}
elif [ "$PRESET" == "pkg" ]; then
build_pkg $pkg_PLATFORM $ESL_ERLANG_PKG_VER
build_pkg $pkg_PLATFORM $pkg_OTP_VERSION
elif [ "$PRESET" == "small_tests" ]; then
time maybe_run_small_tests
SMALL_RESULT=$?
Expand Down

0 comments on commit e1cddd2

Please sign in to comment.