|
@@ -11,12 +11,14 @@ for branch in $(cat package.json | jq .publishing | jq -r keys[]) ; do |
|
|
echo "$( jq --arg repository "$repository" '.repository = $repository' package.json )" > package.json |
|
|
echo "$( jq --arg repository "$repository" '.repository = $repository' package.json )" > package.json |
|
|
echo "Publishing to primary repository: $repository" |
|
|
echo "Publishing to primary repository: $repository" |
|
|
git push |
|
|
git push |
|
|
|
|
|
git reset --hard |
|
|
elif [ $rawRepository != 'null' ]; then |
|
|
elif [ $rawRepository != 'null' ]; then |
|
|
echo "$branch is a mirror" |
|
|
echo "$branch is a mirror" |
|
|
echo "$( jq --arg repository "$repository" '.repository = $repository' package.json )" > package.json |
|
|
echo "$( jq --arg repository "$repository" '.repository = $repository' package.json )" > package.json |
|
|
echo "Publishing to mirror repository: $repository" |
|
|
echo "Publishing to mirror repository: $repository" |
|
|
git commit -am "Publish to $branch" |
|
|
git commit -am "Publish to $branch" |
|
|
git push --mirror $repository |
|
|
git push --mirror $repository |
|
|
|
|
|
git reset --hard |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
rawName=$(cat package.json | jq .publishing.$branch.name) |
|
|
rawName=$(cat package.json | jq .publishing.$branch.name) |
|
@@ -25,6 +27,8 @@ for branch in $(cat package.json | jq .publishing | jq -r keys[]) ; do |
|
|
echo "$( jq --arg name "$name" '.name = $name' package.json )" > package.json |
|
|
echo "$( jq --arg name "$name" '.name = $name' package.json )" > package.json |
|
|
fi |
|
|
fi |
|
|
registry=$(cat package.json | jq -r .publishing.$branch.publishConfig.registry) |
|
|
registry=$(cat package.json | jq -r .publishing.$branch.publishConfig.registry) |
|
|
echo $registry |
|
|
|
|
|
|
|
|
echo "Publishing to package repository: $registry" |
|
|
npm publish --registry=$registry |
|
|
npm publish --registry=$registry |
|
|
done |
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
git checkout $defaultBranch |