-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
25 lines (20 loc) · 760 Bytes
/
Rakefile
File metadata and controls
25 lines (20 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Rakefile for handling docs and aws-exports
require 'graphql-docs'
require 'gist'
require 'fileutils'
require 'colored'
AWS_EXPORTS=File.join(Dir.pwd, "amplify/aws-exports.js").freeze
# Generates GraphQl Api Docs
task :gendoc do
puts("Generating Docs...".cyan)
GraphQLDocs.build(filename: "schema.graphql", delete_output:true, output_dir: "./docs", base_url:"/WarriorBeatGraphQL")
puts("Docs Generated".bold.green)
end
# Upload AWS Exports to Gist
task :upload_exports do
puts("Uploading AWS Exports...".cyan)
puts("Gist ID: #{ENV['AWS_EXPORTS_GIST_ID']}".yellow)
content = File.read(AWS_EXPORTS)
Gist.gist(content, filename:"aws-exports.js", update: ENV['AWS_EXPORTS_GIST_ID'], public:false)
puts("Done!".bold.green)
end