Skip to content

Commit

Permalink
Change entrypoint setup
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewKahr committed Nov 20, 2023
1 parent ce33464 commit 33bdbf6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 34 deletions.
35 changes: 1 addition & 34 deletions dist/platforms/ubuntu/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,7 @@ mkdir -p "/home/$USERNAME"
chown $USERNAME:$GROUPNAME "/home/$USERNAME"

# Switch to the host user so we can create files with the correct ownership
su - $USERNAME -c '
#
# Run steps
#
source /steps/set_extra_git_configs.sh
source /steps/set_gitcredential.sh
source /steps/activate.sh
source /steps/build.sh
source /steps/return_license.sh
#
# Instructions for debugging
#
if [[ $BUILD_EXIT_CODE -gt 0 ]]; then
echo ""
echo "###########################"
echo "# Failure #"
echo "###########################"
echo ""
echo "Please note that the exit code is not very descriptive."
echo "Most likely it will not help you solve the issue."
echo ""
echo "To find the reason for failure: please search for errors in the log above."
echo ""
fi;
#
# Exit with code from the build step.
#
# Exiting su
exit $BUILD_EXIT_CODE
'
su - $USERNAME -c 'source /steps/runsteps.sh'

# Exiting main script
exit $BUILD_EXIT_CODE
34 changes: 34 additions & 0 deletions dist/platforms/ubuntu/steps/runsteps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

#
# Run steps
#
source /steps/set_extra_git_configs.sh
source /steps/set_gitcredential.sh
source /steps/activate.sh
source /steps/build.sh
source /steps/return_license.sh

#
# Instructions for debugging
#

if [[ $BUILD_EXIT_CODE -gt 0 ]]; then
echo ""
echo "###########################"
echo "# Failure #"
echo "###########################"
echo ""
echo "Please note that the exit code is not very descriptive."
echo "Most likely it will not help you solve the issue."
echo ""
echo "To find the reason for failure: please search for errors in the log above."
echo ""
fi;

#
# Exit with code from the build step.
#

# Exiting su
exit $BUILD_EXIT_CODE

0 comments on commit 33bdbf6

Please sign in to comment.