rubyã®gemã ã¨
rake release
ã§
- gemãä½æ
- gemã®ãã¼ã¸ã§ã³ã§
git tag -a ã
git push origin master
git push origin --tags
- RubyGems.org ã«gemããªãªã¼ã¹
ã¾ã§å ¨é¨ãã£ã¦ãããã®ã§ãããChrome Extensionã§ãåããã¨ãããããã¦Gruntã¿ã¹ã¯ã«ãã¦ã¿ã¾ããã
ãã ãã5. ã®é¨åã¯Chrome Extensionã¯ã³ãã³ãã©ã¤ã³ãããã¡ã¤ã«ãï¼ãã¶ãï¼ã¢ããã§ããªãããDeveloper Consoleã«zipãã¢ããããããã®zipãä½ãã ãã§ãã
rubyã§Raketaskã«ãã¦ãããã£ãã®ã§ãããé·ã«å ¥ãã¦ã¯é·ã«å¾ããã£ã¦ãã¨ã§JavaScriptã®æ¨æº(?)ã¿ã¹ã¯ã©ã³ãã¼ã使ã£ã¦ã¿ã¾ããã
åèã«ãããµã¤ã
èªåããã£ãæé
Homebrewã§nodejsãå ¥ãã
brew update brew install nodejs brew upgrade nodejs # æ¢ã«ã¤ã³ã¹ãã¼ã«æ¸ãªããã£ã¡
npm init
対話形å¼ã§è³ªåã«çãã¦ãã㨠package.json *1ãä½ããã https://github.com/sue445/chrome-chatter-share/commit/75a2ac5e11a2c7be834f1b85c2f96c63b335ecc8
åèãµã¤ããå ã«Gruntfile.jsã®ã¹ã±ã«ãã³ãä½ã£ã¦åä½ç¢ºèª
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json') }); grunt.registerTask('default', 'Log some stuff.', function() { grunt.log.write('Logging some stuff...').ok(); }); };
grunt
ã³ãã³ãã§ãã°ãåºã¦ãããã¨ã確èª
https://github.com/sue445/chrome-chatter-share/commit/7cbbae3c6f2f85abecbf3a58907dea594e01e9c0
grunt-chrome-compileãå ¥ãã
ãã£ã±ãã¨ããããå 人ãã¢ã¸ã¥ã¼ã«ã«ãã¦ããã¦ãã®ã§ãããæé£ãå©ç¨
npm install grunt-chrome-compile --save-dev
ãã㨠package.json
ã«ã¢ã¸ã¥ã¼ã«ã追å ããã
Gruntfile.jsã«
grunt.loadNpmTasks('grunt-chrome-compile');
ã追å ã
ãã¨ã¯githubã¿ãªãã Gruntfile.js
ã調æ´
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), 'chrome-extension': { options: { name: "chrome-chatter-share", version: "1.0.3", id: "aehgkgapfagaljikampcebpacdcpkbfc", chrome: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", clean: true, buildDir: 'build', resources: [ "css/**", "fonts/**", "img/**", "lib/**", "src/**", "*.html", "LICENSE", "manifest.json", "README.md" ] } } }); grunt.loadNpmTasks('grunt-chrome-compile'); grunt.registerTask('default', ["chrome-extension"]); };
ä¸å¿ .gitignore
ã«ä¸è¨ã追å ãã¦ãã
echo "node_modules/" >> .gitignore # ä¾åã¢ã¸ã¥ã¼ã«ãã¤ã³ã¹ãã¼ã«å echo "build/" >> .gitignore # zipã®ä½æå
https://github.com/sue445/chrome-chatter-share/commit/bc88948c45a138c9eaa3d326875ecd4a2c97d8a7
ããã§
grunt chrome-extension
㧠build/chrome-chatter-share.zip
ãä½ãããã®ã§ããããDeveloper Consoleã§ã¢ããããã°OK
grunt-git ãã»ããã¢ãã
ãã£ãã¨åãã
npm install grunt-git --save-dev
ãã¦
Gruntfile.jsã«
grunt.loadNpmTasks('grunt-git');
ã追å
ãã¨ã¯githubã¿ãªããå¿
è¦ãªã®ã Gruntfile.js
ã«è¿½å
ä»åèªåãå¿ è¦ã ã£ãã®ã¯
git tag -a "ã" git push origin --tags git push origin maser
ã ã£ãã®ã§ãã®3ã¤ã追å
module.exports = function(grunt) { var manifest = grunt.file.readJSON("manifest.json"); grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), 'chrome-extension': { options: { name: "chrome-chatter-share", version: manifest.version, id: "aehgkgapfagaljikampcebpacdcpkbfc", chrome: "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", clean: true, buildDir: 'build', resources: [ "css/**", "fonts/**", "img/**", "lib/**", "src/**", "*.html", "LICENSE", "manifest.json", "README.md" ] } }, gittag: { append: { options: { tag: manifest.version, message: "release v" + manifest.version } } }, gitpush: { tag: { options: { tags: true } }, master: { options: { branch: "master" } } } }); grunt.loadNpmTasks('grunt-chrome-compile'); grunt.loadNpmTasks('grunt-git'); grunt.registerTask('default', ["chrome-extension"]); };
ãã¼ã¸ã§ã³çªå·ãããã¤ãå®ç¾©ããã®ãé¢åã ã£ãã®ã§ manifest.json
ããèªã¿è¾¼ãããã«ãã¾ããã *2
https://github.com/sue445/chrome-chatter-share/commit/a870abe7dfccfae354ca8a102e34ebea6fa230e0
æå¾ã®ä»ä¸ã
grunt.registerTask('default', ["chrome-extension", "gittag:new_version", "gitpush:tag", "gitpush:master"]);
defaultã«ã¿ã¹ã¯ãç»é²ãã¦ãããã¨ã§ãgrunt
ã³ãã³ãã ãã§ã¿ã¹ã¯ãé çªã«å®è¡ãããã
https://github.com/sue445/chrome-chatter-share/commit/bce5cb367d68d59cb45853bd7a663d86b3d45940
åºæ¥ããã¤
- ä½æ¥ãã° https://github.com/sue445/chrome-chatter-share/pull/13
- å®æå½¢
ã¡ã¢
- GruntfileãJavaScriptã§æ¸ããcoffeescriptã§æ¸ããè¿·ã£ããã©ããã©ã°ã¤ã³ã®ã»ããã¢ãããJavaScriptã®æ¹ãå¤ãã£ãã®ã§ãã£ã¡ã§æ¸ãã
- jsãè¦ãã ãã§coffeeã«è³å å¤æã§ããã ãã®ã¹ãã«ã¯ã¾ã ãªãã®ã§ããã
- zipã®ãã¡ã¤ã«åã¯
manifest.json
ã® short_name ã使ãã°ããã£ããããããªã - ããã°ã©ã æ¸ãã®ã¯æ¥½ã ãã©ãªã¬ãªã¬å®è£
ã¯æ±ç¨æ§ããªãã®ã§ãæ¨æºã®ä»çµã¿ããããªãããã«ä¹ã£ãã£ã¦ãã¾ãã®ã楽ã ãä»ã®äººã¨ä¼è©±ãããã
- ããã¡ã¯ãã¹ã¿ã³ãã¼ãã§ä½ã£ã¦ããã°ä»ã®äººãè¦ãã°ã ãããåããã¯ã
- ãªã¬ãªã¬ã¹ã¯ãªããã¯ç©æ¥µçã«æ¨ã¦ãã¹ã