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.3 KiB

12345678910111213141516171819202122232425262728293031323334
  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. git reset --hard
  12. elif [ $rawRepository != 'null' ]; then
  13. echo "$branch is a mirror"
  14. echo "$( jq --arg repository "$repository" '.repository = $repository' package.json )" > package.json
  15. echo "Publishing to mirror repository: $repository"
  16. git commit -am "Publish to $branch"
  17. git push --mirror $repository
  18. git reset --hard
  19. fi
  20. rawName=$(cat package.json | jq .publishing.$branch.name)
  21. if [ $rawName != 'null' ]; then
  22. name=$(cat package.json | jq -r .publishing.$branch.name)
  23. echo "$( jq --arg name "$name" '.name = $name' package.json )" > package.json
  24. fi
  25. registry=$(cat package.json | jq -r .publishing.$branch.publishConfig.registry)
  26. echo "Publishing to package repository: $registry"
  27. npm publish --registry=$registry
  28. done
  29. git checkout $defaultBranch