Musical keyboard component written in React.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

publish.sh 1.2 KiB

123456789101112131415161718192021222324252627282930
  1. defaultBranch=master
  2. for branch in $(cat package.json | jq .publishing | jq -r keys[]) ; do
  3. git checkout $branch
  4. rawRepository=$(cat package.json | jq -r .publishing.$branch.repository)
  5. repository=$(cat package.json | jq -r .publishing.$branch.repository)
  6. defaultRepository=$(cat package.json | jq -r .publishing.$defaultBranch.repository)
  7. if [ $repository = $defaultRepository ]; then
  8. echo "$( jq --arg repository "$repository" '.repository = $repository' package.json )" > package.json
  9. echo "Publishing to primary repository: $repository"
  10. git push
  11. elif [ $rawRepository != 'null' ]; then
  12. echo "$branch is a mirror"
  13. echo "$( jq --arg repository "$repository" '.repository = $repository' package.json )" > package.json
  14. echo "Publishing to mirror repository: $repository"
  15. git commit -am "Publish to $branch"
  16. git push --mirror $repository
  17. fi
  18. rawName=$(cat package.json | jq .publishing.$branch.name)
  19. if [ $rawName != 'null' ]; then
  20. name=$(cat package.json | jq -r .publishing.$branch.name)
  21. echo "$( jq --arg name "$name" '.name = $name' package.json )" > package.json
  22. fi
  23. registry=$(cat package.json | jq -r .publishing.$branch.publishConfig.registry)
  24. echo $registry
  25. npm publish --registry=$registry
  26. done