Extract and set form values through the DOM—no frameworks required! https://github.com/TheoryOfNekomata/formxtra
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122
  1. defaultBranch=master
  2. for branch in $(cat package.json | jq .publishing | jq -r keys[]) ; do
  3. echo "Selected configuration: $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 "Changing to default repository: $repository"
  9. echo "$( jq --arg repository "$repository" '.repository = $repository' package.json )" > package.json
  10. elif [ $rawRepository != 'null' ]; then
  11. echo "Changing to mirror repository: $repository"
  12. echo "$( jq --arg repository "$repository" '.repository = $repository' package.json )" > package.json
  13. fi
  14. registry=$(cat package.json | jq -r .publishing.$branch.publishConfig.registry)
  15. echo "Publishing to package repository: $registry"
  16. npm publish --registry=$registry --access public
  17. git reset --hard
  18. done