mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
Merge "build: npm/rake entry point for screenshots upload"
This commit is contained in:
commit
d1e3a4147d
13
Rakefile
13
Rakefile
|
@ -13,3 +13,16 @@ task :default => [:test]
|
|||
|
||||
desc 'Run all build/tests commands (CI entry point)'
|
||||
task :test => [:rubocop]
|
||||
|
||||
desc 'Upload screenshots to commons.wikimedia.org'
|
||||
task :commons_upload do
|
||||
require 'commons_upload'
|
||||
required_envs = %w[
|
||||
MEDIAWIKI_API_UPLOAD_URL
|
||||
MEDIAWIKI_USER
|
||||
MEDIAWIKI_PASSWORD
|
||||
]
|
||||
has_all_envs = required_envs.all? { |env| ENV.key?(env) }
|
||||
fail "Requires env variables:\n#{required_envs}" unless has_all_envs
|
||||
CommonsUpload.images
|
||||
end
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
"scripts": {
|
||||
"test": "grunt test",
|
||||
"doc": "jsduck",
|
||||
"postdoc": "grunt copy:jsduck"
|
||||
"postdoc": "grunt copy:jsduck",
|
||||
"screenshots-all": "grunt screenshots-all"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-polyfill": "6.9.1",
|
||||
|
|
Loading…
Reference in a new issue