mirror of
https://github.com/olivierlacan/keep-a-changelog.git
synced 2025-07-27 15:54:06 +02:00
Clarify development commands
This commit is contained in:
parent
912a61f8a1
commit
bb9539bfca
10
README.md
10
README.md
@ -18,11 +18,17 @@ This repository generates https://keepachangelog.com/.
|
|||||||
- `git clone https://github.com/olivierlacan/keep-a-changelog.git`
|
- `git clone https://github.com/olivierlacan/keep-a-changelog.git`
|
||||||
- `cd keep-a-changelog`
|
- `cd keep-a-changelog`
|
||||||
- `bundle install`
|
- `bundle install`
|
||||||
- `bundle exec middleman` starts the local development server at http://localhost:4567
|
- `bin/rake serve` starts a local development server at http://localhost:4567
|
||||||
|
which will reload with any local file changes
|
||||||
|
- `bin/rake build` runs middleman build with `--verbose` flag so build errors are
|
||||||
|
logged for easier debugging
|
||||||
|
|
||||||
### Deployment
|
### Deployment
|
||||||
|
|
||||||
- `bundle exec rake publish` builds and pushes to the `gh-pages` branch
|
- `bin/rake clean` can clean a corrupted `build/` directory in
|
||||||
|
case `publish` failed
|
||||||
|
- `bin/rake publish` builds and pushes to the `gh-pages` branch on GitHub so
|
||||||
|
the site is deployed to keepachangelog.com
|
||||||
|
|
||||||
### Translations
|
### Translations
|
||||||
|
|
||||||
|
12
Rakefile
12
Rakefile
@ -1,9 +1,21 @@
|
|||||||
require "middleman-gh-pages"
|
require "middleman-gh-pages"
|
||||||
|
|
||||||
|
desc "Preview build on localhost:4567 with live reload"
|
||||||
|
task :serve do
|
||||||
|
puts "Running local development server on http://localhost:4567"
|
||||||
|
system("bundle exec middleman serve")
|
||||||
|
end
|
||||||
|
|
||||||
desc "Build and publish to GitHub Pages"
|
desc "Build and publish to GitHub Pages"
|
||||||
task :deploy => :publish
|
task :deploy => :publish
|
||||||
|
|
||||||
desc "Clean build directory"
|
desc "Clean build directory"
|
||||||
|
task :build do
|
||||||
|
puts "Build site into build/ directory, print any errors"
|
||||||
|
system("bundle exec middleman build --verbose")
|
||||||
|
end
|
||||||
|
|
||||||
|
desc "Detele the build directory"
|
||||||
task :clean do
|
task :clean do
|
||||||
puts "Cleaning build/ directory"
|
puts "Cleaning build/ directory"
|
||||||
system("rm -rf build/")
|
system("rm -rf build/")
|
||||||
|
29
bin/rake
Executable file
29
bin/rake
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
#
|
||||||
|
# This file was generated by Bundler.
|
||||||
|
#
|
||||||
|
# The application 'rake' is installed as part of a gem, and
|
||||||
|
# this file is here to facilitate running it.
|
||||||
|
#
|
||||||
|
|
||||||
|
require "pathname"
|
||||||
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
||||||
|
Pathname.new(__FILE__).realpath)
|
||||||
|
|
||||||
|
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
||||||
|
|
||||||
|
if File.file?(bundle_binstub)
|
||||||
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
||||||
|
load(bundle_binstub)
|
||||||
|
else
|
||||||
|
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
||||||
|
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
require "rubygems"
|
||||||
|
require "bundler/setup"
|
||||||
|
|
||||||
|
load Gem.bin_path("rake", "rake")
|
Loading…
x
Reference in New Issue
Block a user