I want to count the last release on GH as the last stable, which is 41eb093 which is:
* 41eb093 (tag: v0.1.2) v0.1.2
Why didn't v0.1.2 (insider knowledge) get picked up? Because of v prefix?
Try git tag -a 0.1.2 v0.1.2 and see if it gets picked up? No
Actually, it is picking up a tag, v0.1.0
...
* bf7b08a docs: embed video (#203)
* 41eb093 (tag: v0.1.2, tag: 0.1.2) v0.1.2
* 740977c fix: scaffold santa with carrot pin
* 9672b03 (tag: v0.1.1) v0.1.1
* 7988ca8 fix: scaffold prisma with latest stable ver
* 370f35e chore: fix publish script
* 0a1cf73 (tag: v0.1.0) v0.1.0
Looks like a bug, ... ah not using next which does have a bug fix (goes and publishes a stable release on dripip)
Try again yarn add --dev dripip and this time things look right:
❯ yarn -s dripip preview --dry-run | jq
{
"kind": "ok",
"type": "dry_run",
"data": {
"currentStable": "0.1.2",
"currentPreviewNumber": null,
"nextStable": "0.2.0",
"nextPreviewNumber": 1,
"currentVersion": "0.1.2",
"nextVersion": "0.2.0-next.1",
"commitsInRelease": [
"docs: improvements\n\n- restructure navbar groupings and section titles\n- bring back guides content\n- introduce getting started group\n- add roadmap section\n- add npx prompt to cover page",
"chore(deps): update dependency husky to v4.0.8 (#277)\n\nCo-authored-by: WhiteSource Renovate <renovatebot@gmail.com>",
"refactor: rename tsx to ts and remove `jsx` from tsconfig.json",
"docs: scroll to top on docs page change (#271)",
"docs(dev): add code architecture",
"docs: learn section",
"fix: command rendering glitch (#266)",
"chore: remove ink",
"Remove dev ui (fixes #222, #202)",
"refactor: rename setupTest to createTestContext",
"feat: add `setupTest` for easy testing (#243)",
"docs: improvements\n\n- styling\n- logger component features\n- logger component future feature issue links",
"docs: link components to gh issues",
"docs: nav style and content",
"chore(deps): update dependency husky to v4.0.7 (#262)\n\nCo-authored-by: WhiteSource Renovate <renovatebot@gmail.com>",
"docs: move readme contents to website",
"docs: simplify navigation",
"docs: explain logging component",
"docs: add cover to website (#259)",
"chore(deps): update dependency husky to v4.0.6 (#256)\n\nCo-authored-by: WhiteSource Renovate <renovatebot@gmail.com>",
"improve: log pretty rendering (#257)",
"tests: refactor and cover pretty format",
"docs: add logger changes",
"chore(deps): update dependency husky to v4.0.5 (#255)\n\nCo-authored-by: WhiteSource Renovate <renovatebot@gmail.com>",
"feat: pretty mode (#254)\n\ncloses #252",
"chore(deps): update dependency husky to v4.0.4 (#253)\n\nCo-authored-by: WhiteSource Renovate <renovatebot@gmail.com>",
"chore(deps): pin dependency @types/lodash to 4.14.149 (#245)\n\nCo-authored-by: WhiteSource Renovate <renovatebot@gmail.com>",
"feat: context logger (#249)\n\ncloses #248",
"docs: add logger to api ref",
"chore(deps): update dependency husky to v4.0.3 (#246)\n\nCo-authored-by: Renovate Bot <renovatebot@gmail.com>",
"feat: logger (#244)",
"chore(deps): update dependency husky to v4.0.1 (#240)\n\nCo-authored-by: Renovate Bot <renovatebot@gmail.com>",
"chore(deps): update dependency husky to v4 (#232)\n\nCo-authored-by: Renovate Bot <renovatebot@gmail.com>",
"chore(deps): update dependency ts-jest to v24.3.0 (#233)\n\nCo-authored-by: Renovate Bot <renovatebot@gmail.com>",
"simple docs with docsify (#235)",
"chore(deps): remove unused deps",
"chore(deps): update dependency globby to v11 (#218)\n\nCo-authored-by: Renovate Bot <renovatebot@gmail.com>",
"chore(deps): update patch & minor dev dependencies (#217)\n\nCo-authored-by: Renovate Bot <renovatebot@gmail.com>",
"chore(renovate): remove packagePatterns",
"chore: group renovate deps pr",
"chore(deps): pin dependencies (#215)\n\nCo-authored-by: Renovate Bot <renovatebot@gmail.com>",
"Configure Renovate (#214)\n\nCo-authored-by: Renovate Bot <renovatebot@gmail.com>",
"docs: build toc",
"docs: add links and videos section",
"docs: fix video link",
"docs: embed video (#203)\n\ncloses #190"
],
"bumpType": "minor",
"isFirstVer": false,
"isFirstVerStable": false,
"isFirstVerPreRelease": true
}
}
Let's go for it yarn -s dripip preview
oh no npm ERR! 401 Unauthorized - PUT https://registry.yarnpkg.com/graphql-santa - You must be logged in to publish packages.
because running in yarn context prevents npm registry access...
try workaround node_modules/.bin/dripip preview
Something got published last time after all... huh... confused npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/graphql-santa - You cannot publish over the previously published versions: 0.2.0-next.1
I need to force the next version artificially as there is no way to republish a package ver on npm https://docs.npmjs.com/unpublishing-packages-from-the-registry. The dripip cli doesn't have that feature yet so I need to manually edit the git history... luckily there is a commit I don't care about and can toss a tag on it, but that is pure luck...
git tag -a 0.2.0-next.1 bf7b08a and dry-run looks good again...
Finally worked!
❯ node_modules/.bin/dripip preview
updated package.json in prep for publishing
published package to the npm registry
reverted package.json changes now that publishing is done
tagged this commit with 0.2.0-next.2
pushed tag to remote
updated git-tag "next"
It is not obvious how to adopt
dripip
on brownfield projects.Here's how it played out on
graphql-santa
:yarn add --dev dripip
What would happen now?
yarn dripip preview --dry-run
I have a few releases on GH https://github.com/prisma-labs/graphql-santa/releases
I want to count the last release on GH as the last stable, which is
41eb093
which is:v0.1.2
(insider knowledge) get picked up? Because ofv
prefix?git tag -a 0.1.2 v0.1.2
and see if it gets picked up? NoActually, it is picking up a tag,
v0.1.0
next
which does have a bug fix (goes and publishes a stable release ondripip
)Try again
yarn add --dev dripip
and this time things look right:yarn -s dripip preview
npm ERR! 401 Unauthorized - PUT https://registry.yarnpkg.com/graphql-santa - You must be logged in to publish packages.
yarn
context prevents npm registry access...node_modules/.bin/dripip preview
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/graphql-santa - You cannot publish over the previously published versions: 0.2.0-next.1
I need to force the next version artificially as there is no way to republish a package ver on npm https://docs.npmjs.com/unpublishing-packages-from-the-registry. The dripip cli doesn't have that feature yet so I need to manually edit the git history... luckily there is a commit I don't care about and can toss a tag on it, but that is pure luck...
git tag -a 0.2.0-next.1 bf7b08a
and dry-run looks good again...Finally worked!
Conclusions
yarn
feature: prompt to add release scripts: