Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 42 lines (37 sloc) 1.045 kb
29a75ee @mitukiii crx / zip ビルド用スクリプト作成
authored
1 # -*- coding: utf-8 -*-
2
3 require 'rubygems'
4 require 'crxmake'
5 require 'json'
6
7 NAME = 'make-booth-stream'
8 PEM = File.join(File.dirname(__FILE__), "#{NAME}.pem")
9 MANIFEST_PATH = File.join(File.dirname(__FILE__), 'src', 'manifest.json')
10 MANIFEST = JSON.parse(open(MANIFEST_PATH).read).freeze
11 VERSION = MANIFEST['version']
12
13 namespace :pkg do
14 desc 'create crx'
15 task :crx do
16 mkdir_p 'pkg' unless File.exists? 'pkg'
17 package = "pkg/#{NAME}.crx"
18 rm package if File.exists? package
19 CrxMake.make(
20 :ex_dir => 'src',
21 :pkey => PEM,
22 :crx_output => package,
23 :verbose => true,
24 :ignoredir => /^\.git$/
25 )
26 end
27
28 desc 'create zip for Google Extension Gallery'
29 task :zip do
30 mkdir_p 'pkg' unless File.exists? 'pkg'
31 package = "pkg/#{NAME}.zip"
32 rm package if File.exists? package
33 CrxMake.zip(
34 :ex_dir => 'src',
35 :pkey => PEM,
36 :zip_output => package,
37 :verbose => true,
38 :ignoredir => /^\.git$/
39 )
40 end
41 end
Something went wrong with that request. Please try again.