jitpack / jitpack.io

Documentation and issues of https://jitpack.io
MIT License
2.54k stars 186 forks source link

Custom steps in before installation do not run #1724

Open kpl-goel opened 7 years ago

kpl-goel commented 7 years ago

Currently we are having a problem in running custom steps before making a build.

We use a service to download the translations in different languages before running the build step. But we cannot run the service on Jitpack servers. Major reason we think of it is because Jitpack build servers use an outdated version of npm and that's why npm script build for node > 4 cannot run.

Our jitpack.yml is:

jdk:
  - oraclejdk8

before_install:
   - echo "Downloading strings from Locize"
   - mkdir -p npm
   - npm install --prefix npm/ -g locize-cli
   - mkdir -p ./translations
   - npm/bin/locize download --project-id xxx --ver latest --language es --namespace production --target ./translations --format android
   - mkdir -p app/src/main/res/values-es
   - cp -r translations/es/production.xml app/src/main/res/values-es/strings.xml

Link to the failed build is https://jitpack.io/com/github/fubotv/player_android/69f695da43/build.log We can run locize script on our and circleCI machines properly.

sschuberth commented 5 years ago

AFAIK npm is not installed at all by default. At least here we get

npm: command not found