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

Several improvements on ynh-dev script #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christophehenry
Copy link

  • Use command yarnpkg on Debian 12+
  • Add --skip-yarn-install option to use-git subcommand to skip installing NPM deps in the container
  • Add use -y on apt command to avoid asking confirmation when installing yarn
  • Always systemctl start yunohost-api on use-git yunohost-admin

@@ -2,6 +2,12 @@

# shellcheck disable=SC2155,SC2034,SC2164

if (( $(lsb_release -rs) >= 12 )); then
YARN_CMD=yarnpkg
Copy link
Author

Choose a reason for hiding this comment

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

On Debian 12+, the package seems to be yarnpkg and yarn seems to correspond to cmdtest.

@christophehenry christophehenry force-pushed the improvements branch 3 times, most recently from 6f2aaef to 9f66625 Compare February 16, 2025 13:12
cd "$DEV_PATH"
systemctl start yunohost-api
Copy link
Author

Choose a reason for hiding this comment

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

That's weird. When working with the container, yunohost-api seems not started and it creates problems when developing the front.

# Inject container ip in .env file
# Used by vite to expose itself on network and proxy api requests.
echo "VITE_IP=$(hostname -I | tr ' ' '\n' | grep "\.")" > "$DEV_PATH/.env"
create_sym_link "$DEV_PATH/.env" "$CACHE_PATH/.env"
Copy link
Author

@christophehenry christophehenry Feb 16, 2025

Choose a reason for hiding this comment

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

The .env file seemedto never contained the correct IP. I hope sourcing it at the very last moment fixes it.

- Use command yarnpkg on Debian 12+
- Add --skip-yarn-install option to use-git subcommand to skip installing NPM deps in the container
- Add use -y on apt command to avoid asking confirmation when installing yarn
- Always 'systemctl start yunohost-api' on 'use-git yunohost-admin'
- Fix Python script to add 8080 in allowed ports
- 'set -e -o pipefail' to better catch this kind of errors
- Always install dependencies from control file when 'use-git yunohost'
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.

1 participant