Skip to content

Commit a0af80c

Browse files
authored
ci: release strategy (#63)
* ci: loading in splitsh for help to release sdks to r/o repos * ci: setting up a split flow for mirroring packages to r/o repos
1 parent 8ebd1fe commit a0af80c

File tree

5 files changed

+52
-24
lines changed

5 files changed

+52
-24
lines changed

bin/split.sh

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
set -x
4+
5+
CURRENT_BRANCH="master"
6+
7+
function split() {
8+
# https://github.com/splitsh/lite
9+
SHA1=`./bin/splitsh-lite --prefix=$1`
10+
git push $2 "$SHA1:refs/heads/$CURRENT_BRANCH" -f
11+
}
12+
13+
function remote() {
14+
git remote add $1 $2 || true
15+
}
16+
17+
git pull origin $CURRENT_BRANCH
18+
19+
remote sdks-node [email protected]:readmeio/metrics-sdks-node.git
20+
remote sdks-php [email protected]:readmeio/metrics-sdks-php.git
21+
remote sdks-python [email protected]:readmeio/metrics-sdks-python.git
22+
remote sdks-ruby [email protected]:readmeio/metrics-sdks-ruby.git
23+
24+
split 'packages/node' sdks-node
25+
split 'packages/php' sdks-php
26+
split 'packages/python' sdks-python
27+
split 'packages/ruby' sdks-ruby

bin/splitsh-lite

3.22 MB
Binary file not shown.

packages/node/package.json

+22-18
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22
"name": "readmeio",
33
"description": "Track your API metrics within ReadMe.",
44
"version": "3.1.2",
5+
"license": "ISC",
6+
"homepage": "https://readme.com/metrics",
7+
"bugs": {
8+
"email": "[email protected]",
9+
"url": "https://github.com/readmeio/metrics-sdks/issues"
10+
},
11+
"repository": {
12+
"type": "git",
13+
"url": "[email protected]:readmeio/metrics-sdks.git"
14+
},
15+
"keywords": [
16+
"api-metrics",
17+
"readme"
18+
],
519
"engines": {
620
"node": ">=10"
721
},
@@ -13,24 +27,6 @@
1327
"node-fetch": "^2.6.0",
1428
"uuid": "^8.2.0"
1529
},
16-
"scripts": {
17-
"lint": "eslint .",
18-
"inspect": "jsinspect",
19-
"pretest": "npm run lint && npm run inspect && npm run prettier",
20-
"prettier": "prettier --list-different --write \"./**/**.js\"",
21-
"release": "conventional-changelog -i CHANGELOG.md -s",
22-
"test": "jest --coverage"
23-
},
24-
"publishConfig": {
25-
"registry": "http://registry.npmjs.org"
26-
},
27-
"author": "Dom Harrington <[email protected]>",
28-
"license": "ISC",
29-
"repository": {
30-
"type": "git",
31-
"url": "[email protected]:readmeio/metrics-sdks.git",
32-
"directory": "packages/node"
33-
},
3430
"devDependencies": {
3531
"@readme/eslint-config": "^3.0.0",
3632
"body-parser": "^1.19.0",
@@ -45,6 +41,14 @@
4541
"rimraf": "^3.0.2",
4642
"supertest": "^4.0.2"
4743
},
44+
"scripts": {
45+
"lint": "eslint .",
46+
"inspect": "jsinspect",
47+
"pretest": "npm run lint && npm run inspect && npm run prettier",
48+
"prettier": "prettier --list-different --write \"./**/**.js\"",
49+
"release": "conventional-changelog -i CHANGELOG.md -s",
50+
"test": "jest --coverage"
51+
},
4852
"jest": {
4953
"globalSetup": "<rootDir>/__tests__/jest.setup.js",
5054
"testMatch": [

packages/php/composer.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@
33
"description": "Track your API metrics within ReadMe.",
44
"homepage": "https://readme.com/metrics",
55
"license": "ISC",
6-
"authors": [
7-
{
8-
"name": "Jon Ursenbach",
9-
"email": "[email protected]"
10-
}
11-
],
126
"support": {
137
"docs": "https://docs.readme.com/docs/sending-api-logs-to-readme",
8+
"email": "[email protected]",
149
"issues": "https://github.com/readmeio/metrics-sdks/issues",
1510
"source": "https://github.com/readmeio/metrics-sdks"
1611
},

packages/ruby/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Track your API metrics within ReadMe.
44

5+
[![Build](https://github.com/readmeio/metrics-sdks/workflows/ruby/badge.svg)](https://github.com/readmeio/metrics-sdks)
6+
57
[![](https://d3vv6lp55qjaqc.cloudfront.net/items/1M3C3j0I0s0j3T362344/Untitled-2.png)](https://readme.io)
68

79
## Installation

0 commit comments

Comments
 (0)