Skip to content

Commit a9807a6

Browse files
authored
Merge branch 'progit:master' into chore/update-link-in-readme
2 parents 7211953 + 6f5dab8 commit a9807a6

File tree

18 files changed

+145
-132
lines changed

18 files changed

+145
-132
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: "bug"
6+
assignees: ""
87
---
98

109
<!-- Before filing a bug please check the following: -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
blank_issues_enabled: false
12
contact_links:
23
- name: Translation bug
34
url: https://github.com/progit/progit2/blob/master/TRANSLATING.md
45
about: Refer to this table to find out where to report translation bugs.
56

67
- name: Report bugs for git-scm.com site
78
url: https://github.com/git/git-scm.com/issues/
8-
about: Please report problems with the git-scm.com site here.
9+
about: Please report problems with the git-scm.com site there.
910

1011
- name: Bug is about Git program itself
1112
url: https://git-scm.com/community
12-
about: Please report problems with the Git program here.
13+
about: Please report problems with the Git program there.
1314

1415
- name: Bug is about Git for Windows
1516
url: https://github.com/git-for-windows/git/issues
16-
about: Please report problems with Git for Windows here.
17+
about: Please report problems with Git for Windows there.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: Enhancement idea
3+
about: Suggest an idea for the ProGit2 book or repository
4+
title: ""
5+
labels: "enhancement"
6+
assignees: ""
7+
---
8+
9+
**Give a general overview of your idea.**
10+
11+
**Explain what problem you're trying to solve.**
12+
13+
**Have you thought about other solutions?**
14+
15+
**Do you want to help with this enhancement idea?**

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ updates:
66
schedule:
77
interval: "daily" # Checks on Monday trough Friday.
88

9+
# Maintain GitHub Action runners
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "daily" # Checks on Monday trough Friday.
14+
915
# Set default reviewer and labels
1016
reviewers:
1117
- "ben"

.github/workflows/pr-build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Pull Request Build
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Set up Ruby
14+
uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: 2.7
17+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
18+
19+
- name: Build book
20+
run: bundle exec rake book:build
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release on push to master
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Compute tag name
16+
id: compute-tag
17+
run: |
18+
echo Computing next tag number
19+
LASTPATCH=$(git describe --tags | cut -d- -f1 | cut -d. -f3)
20+
PATCH=$(($LASTPATCH+1))
21+
echo "::set-output name=tagname::2.1.${PATCH}"
22+
23+
- name: Set up Ruby
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: 2.7
27+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
28+
29+
- name: Build release assets
30+
run: bundle exec rake book:build
31+
32+
- name: Create release
33+
uses: ncipollo/release-action@v1
34+
with:
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
tag: ${{ steps.compute-tag.outputs.tagname }}
37+
commit: master
38+
artifacts: './progit.epub,./progit.mobi,./progit.pdf,./progit.html'

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ gem 'asciidoctor', '2.0.15'
66
gem 'json', '2.5.1'
77
gem 'awesome_print', '1.9.2'
88

9-
gem 'asciidoctor-epub3', '1.5.0.alpha.19'
10-
gem 'asciidoctor-pdf', '1.5.4'
9+
gem 'asciidoctor-epub3', '1.5.1'
10+
gem 'asciidoctor-pdf', '1.6.0'
1111

1212
gem 'coderay', '1.1.3'
1313
gem 'pygments.rb', '2.2.0'
1414
gem 'thread_safe', '0.3.6'
1515
gem 'epubcheck-ruby', '4.2.5.0'
16-
gem 'html-proofer', '3.19.0'
16+
gem 'html-proofer', '3.19.2'

README.asc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ See link:TRANSLATING.md[the translating document] for more information.
1515
== How To Generate the Book
1616

1717
You can generate the e-book files manually with Asciidoctor.
18-
We used to be able to build .mobi files (Kindle), but cannot do so now, see #1496 for more information.
19-
If you run the following you _may_ actually get HTML, Epub and PDF output files:
18+
If you run the following you _may_ actually get HTML, Epub, Mobi and PDF output files:
2019

2120
----
2221
$ bundle install
@@ -25,11 +24,13 @@ Converting to HTML...
2524
-- HTML output at progit.html
2625
Converting to EPub...
2726
-- Epub output at progit.epub
27+
Converting to Mobi (kf8)...
28+
-- Mobi output at progit.mobi
2829
Converting to PDF...
2930
-- PDF output at progit.pdf
3031
----
3132

32-
You can generate just one of the supported formats (HTML, EPUB, or PDF).
33+
You can generate just one of the supported formats (HTML, EPUB, mobi, or PDF).
3334
Use one of the following commands:
3435

3536
To generate the HTML book:
@@ -44,6 +45,12 @@ To generate the EPUB book:
4445
$ bundle exec rake book:build_epub
4546
----
4647

48+
To generate the mobi book:
49+
50+
----
51+
$ bundle exec rake book:build_mobi
52+
----
53+
4754
To generate the PDF book:
4855

4956
----

Rakefile

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace :book do
77
end
88

99
# Variables referenced for build
10-
version_string = ENV['TRAVIS_TAG'] || `git describe --tags`.chomp
10+
version_string = `git describe --tags`.chomp
1111
if version_string.empty?
1212
version_string = '0'
1313
end
@@ -37,7 +37,7 @@ namespace :book do
3737
end
3838

3939
desc 'build basic book formats'
40-
task :build => [:build_html, :build_epub, :build_pdf] do
40+
task :build => [:build_html, :build_epub, :build_mobi, :build_pdf] do
4141
begin
4242
# Run check
4343
Rake::Task['book:check'].invoke
@@ -50,7 +50,7 @@ namespace :book do
5050
end
5151

5252
desc 'build basic book formats (for ci)'
53-
task :ci => [:build_html, :build_epub, :build_pdf] do
53+
task :ci => [:build_html, :build_epub, :build_mobi, :build_pdf] do
5454
# Run check, but don't ignore any errors
5555
Rake::Task['book:check'].invoke
5656
end
@@ -84,18 +84,11 @@ namespace :book do
8484

8585
desc 'build Mobi format'
8686
task :build_mobi => 'book/contributors.txt' do
87-
# Commented out the .mobi file creation because the kindlegen dependency is not available.
88-
# For more information on this see: #1496.
89-
# This is a (hopefully) temporary fix until upstream asciidoctor-epub3 is fixed and we can offer .mobi files again.
90-
91-
# puts "Converting to Mobi (kf8)..."
92-
# `bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc`
93-
# puts " -- Mobi output at progit.mobi"
94-
95-
# FIXME: If asciidoctor-epub3 supports Mobi again, uncomment these lines below
96-
puts "Converting to Mobi isn't supported yet."
97-
puts "For more information see issue #1496 at https://github.com/progit/progit2/issues/1496."
98-
exit(127)
87+
check_contrib()
88+
89+
puts "Converting to Mobi (kf8)..."
90+
`bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc`
91+
puts " -- Mobi output at progit.mobi"
9992
end
10093

10194
desc 'build PDF format'
@@ -120,7 +113,7 @@ namespace :book do
120113
begin
121114
puts 'Removing generated files'
122115

123-
FileList['book/contributors.txt', 'progit.html', 'progit.epub', 'progit.pdf'].each do |file|
116+
FileList['book/contributors.txt', 'progit.html', 'progit.epub', 'progit.mobi', 'progit.pdf'].each do |file|
124117
rm file
125118

126119
# Rescue if file not found

0 commit comments

Comments
 (0)