dideler / toggle-youtube-comments

:cinema: :zipper_mouth_face: Chrome extension to hide or show YouTube comments
https://chrome.google.com/webstore/detail/toggle-youtube-comments/ampjnmipdgicjjidohpkidhghakoidfm
MIT License
14 stars 2 forks source link

Make it easier to release a new version #36

Closed dideler closed 6 years ago

dideler commented 6 years ago

Even though we have a build process, there's still a lot of manual release steps.

It would be nice to have easier version bumps, for example

make version <newversion> | major | minor | patch

Nice to haves

(Note the example uses Make but this applies to any build system we end up using long term.)

1natsu172 commented 6 years ago

📝 Util libraries is these.

I haven't tried any of them yet. But 'bumped' feels good. As we can have config with yml or json, it seems easy to manage release messages. Also, 'bumped' seems to be able to specify other files of packgae.json. We also have to bump manifest.json.

1natsu172 commented 6 years ago

hmmm, I tried locally 'bumped' but I got an npm error... when bumped init then thenbumped version 🤔 If this isn't my problem only, it may not be good.


【Additional notes】 I asked the question with 'bumped' issue and it was fixed by the author! 'bumped' is working now without problems.

1natsu172 commented 6 years ago

There were also some other nice automatic release libraries.

Considering the creation of the GitHub release, is it better to use these than 'bumped'?

dideler commented 6 years ago

Thanks to #37, npm-version is now an option.

We can extend npm-version with preversion, version, or postversion scripts. I think we should try this standard approach first and if it's not good enough, then we can try a third party library or build something custom.

1natsu172 commented 6 years ago

Well, the npm version * command is certainly useful. It also git commit and create tag. If we use the postversion command, can automatically push these.

"scripts": {
    "version": "(BUMP MANIFEST.JSON PROCESS) && git add .",
    "postversion": "git push && git push --tags",
    "bump:patch": "npm version patch -m \":arrow_up: Bump version to %s\"",
    "bump:minor": "npm version minor -m \":arrow_up: Bump version to %s\"",
    "bump:major": "npm version major -m \":arrow_up: Bump version to %s\""
}

We can attach a commit message with the -m option, but in order to attach the same commit message to menifest.json's bump process at the same time, we have to do as above. but I think it's too hard to just write the manifest.json bump process on the single line here. Because we write code to get "version" value of package.json and regex condition and rewrite "version" of manifest.json.

I think that it is better to divide it into processing file like tasks/bumpmanifest.js 🤔 How do you feel?

dideler commented 6 years ago

@1natsu172 please take a look at #38 🙏

I didn't include the bump:* scripts. It would limit our bumping capabilities to a subset of npm-version features, and also introduces a non-standard way of bumping (e.g. npm run bump:minor vs npm version minor) for little benefit. We can manually pass the -m option if we want to continue having commits consistent with the older version bumps, but I'm also okay with the new and plain vX.Y.Z commit messages.

I've created #39 for some potential follow-up improvements.

1natsu172 commented 6 years ago

@dideler thanks for #38 .

I was writing the bump: * command to make the commit message easier. But if you manually -m or allow plainvX.Y.Z, I think that is OK! 👍