|
46 | 46 | env: |
47 | 47 | VERSION: ${{ steps.version.outputs.VERSION }} |
48 | 48 | run: | |
49 | | - if curl -s "https://pub.dev/api/packages/dart_node_core/versions/$VERSION" | grep -q '"version"'; then |
| 49 | + RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" "https://pub.dev/api/packages/dart_node_core/versions/$VERSION") |
| 50 | + if [ "$RESPONSE" = "200" ]; then |
50 | 51 | echo "dart_node_core $VERSION already exists on pub.dev, skipping..." |
51 | 52 | else |
52 | 53 | cd packages/dart_node_core |
|
74 | 75 | env: |
75 | 76 | VERSION: ${{ steps.version.outputs.VERSION }} |
76 | 77 | run: | |
77 | | - if curl -s "https://pub.dev/api/packages/dart_node_express/versions/$VERSION" | grep -q '"version"'; then |
| 78 | + RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" "https://pub.dev/api/packages/dart_node_express/versions/$VERSION") |
| 79 | + if [ "$RESPONSE" = "200" ]; then |
78 | 80 | echo "dart_node_express $VERSION already exists on pub.dev, skipping..." |
79 | 81 | else |
80 | 82 | cd packages/dart_node_express |
|
86 | 88 | env: |
87 | 89 | VERSION: ${{ steps.version.outputs.VERSION }} |
88 | 90 | run: | |
89 | | - if curl -s "https://pub.dev/api/packages/dart_node_ws/versions/$VERSION" | grep -q '"version"'; then |
| 91 | + RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" "https://pub.dev/api/packages/dart_node_ws/versions/$VERSION") |
| 92 | + if [ "$RESPONSE" = "200" ]; then |
90 | 93 | echo "dart_node_ws $VERSION already exists on pub.dev, skipping..." |
91 | 94 | else |
92 | 95 | cd packages/dart_node_ws |
|
98 | 101 | env: |
99 | 102 | VERSION: ${{ steps.version.outputs.VERSION }} |
100 | 103 | run: | |
101 | | - if curl -s "https://pub.dev/api/packages/dart_node_react/versions/$VERSION" | grep -q '"version"'; then |
| 104 | + RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" "https://pub.dev/api/packages/dart_node_react/versions/$VERSION") |
| 105 | + if [ "$RESPONSE" = "200" ]; then |
102 | 106 | echo "dart_node_react $VERSION already exists on pub.dev, skipping..." |
103 | 107 | else |
104 | 108 | cd packages/dart_node_react |
@@ -126,7 +130,8 @@ jobs: |
126 | 130 | env: |
127 | 131 | VERSION: ${{ steps.version.outputs.VERSION }} |
128 | 132 | run: | |
129 | | - if curl -s "https://pub.dev/api/packages/dart_node_react_native/versions/$VERSION" | grep -q '"version"'; then |
| 133 | + RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" "https://pub.dev/api/packages/dart_node_react_native/versions/$VERSION") |
| 134 | + if [ "$RESPONSE" = "200" ]; then |
130 | 135 | echo "dart_node_react_native $VERSION already exists on pub.dev, skipping..." |
131 | 136 | else |
132 | 137 | cd packages/dart_node_react_native |
|
0 commit comments