Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/v2/local trigger #9

Open
wants to merge 10 commits into
base: feature/v2/base
Choose a base branch
from
Open

Conversation

jabou
Copy link
Member

@jabou jabou commented Dec 5, 2024

In this PR, you can find some changes and news.

Changes

  • Project structure, by removing everything from one large file into a few separate smaller files inside the sources folder
  • Updates the install/update logic to confirm that change
  • Set __ on a "private" function name (redhat convention)
  • Updates the content of deploy-options.sh (options defined per project) by making it more mobile-related (from iOS-oriented) and by adding the flag that defines the version of the tag format.

New features

  • A new init command is added. Once the script is installed (existing install command), the developer should run app-deploy init in the project's root, where the .deploy-options.sh file will be added. That's the only file the dev should edit.
  • Added a new script_version flag that defines whether the project uses the old v1 approach (script generating build number) or the new v2 approach (script creating trigger tag). If someone updates the script but leaves .deploy-options.sh without this property, the script will fall back to v1—this ensures backward compatibility.

Usage

Screen.Recording.2024-12-05.at.17.30.37.mov

fi

# Get install files
git clone --quiet https://github.com/infinum/app-deploy-script.git --branch feature/v2/local-trigger .app_deploy_tmp

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--branch feature/v2/local-trigger

You will not forget to remove this, right? 😄

Comment on lines +28 to +29
cat /Users/jaco/Infinum/Infinum_projects/AppDeployScript/app-deploy-script/app-deploy.sh > /usr/local/bin/app-deploy
cp -a /Users/jaco/Infinum/Infinum_projects/AppDeployScript/app-deploy-script/sources/. /usr/local/bin/.app-deploy-sources/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should comment this out maybe? And maybe "sanitize" your local path 😄

if [ ${environment} -le $((${#environments[@]} - 1)) -a ${environment} -ge 0 ]; then
environments_to_build+=("${environments[${environment}]}")
else
echo "Error: You chose wrong, young Jedi. This is the end of your path..."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Young Jedi or young Padawan? 🤔


if [ -e "./.deploy-options.sh" ]; then
echo "Options file already exists."
echo "If you continue, stored options will be overriden!"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "If you continue, stored options will be overriden!"
echo "If you continue, stored options will be overridden!"

echo
echo "[3] App Store"
echo "[3] App/Play Store"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate the inclusivity 👍

echo
echo "[3] App Store"
echo "[3] App/Play Store"
echo
read -r -p "Enter number in square brackets: " target_selection

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might help to be a bit more descriptive and explain how you can put multiple numbers delimited by space

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants