forked from progit/progit2-zh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'progit:master' into master
- Loading branch information
Showing
13 changed files
with
119 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Pull Request Build | ||
|
||
on: | ||
pull_request: | ||
branches: [ main, master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Download bootstrap file | ||
run: wget https://raw.githubusercontent.com/progit/progit2-pub/master/bootstrap.sh | ||
- name: Run bootstrap | ||
run: sh bootstrap.sh | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
|
||
- name: Build book | ||
run: bundle exec rake book:build_action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Release on push to main | ||
|
||
on: | ||
push: | ||
branches: [ main, master ] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: get bootstrap file | ||
run: wget https://raw.githubusercontent.com/progit/progit2-pub/master/bootstrap.sh | ||
- name: run bootstrap | ||
run: sh bootstrap.sh | ||
- name: Compute tag name | ||
id: compute-tag | ||
run: | | ||
echo Computing next tag number | ||
LASTPATCH=$(git describe --tags | cut -d- -f1 | cut -d. -f3) | ||
PATCH=$(($LASTPATCH+1)) | ||
echo "::set-output name=tagname::2.1.${PATCH}" | ||
echo "::set-output name=branch::${GITHUB_REF#refs/heads/}" | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.7 | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
|
||
- name: Build release assets | ||
run: bundle exec rake book:build_action | ||
|
||
- name: Create release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ steps.compute-tag.outputs.tagname }} | ||
commit: ${{ steps.compute-tag.outputs.branch }} | ||
artifacts: './progit.epub,./progit.mobi,./progit.pdf,./progit.html' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ Dulwich follows git design and separate two basic levels of API: plumbing and po | |
Here is an example of using the lower level API to access the commit message of the last commit: | ||
|
||
[source, python] | ||
----- | ||
---- | ||
from dulwich.repo import Repo | ||
r = Repo('.') | ||
r.head() | ||
|
@@ -23,22 +23,21 @@ c | |
c.message | ||
# 'Add note about encoding.\n' | ||
----- | ||
---- | ||
|
||
To print a commit log using high-level porcelain API, one can use: | ||
|
||
[source, python] | ||
----- | ||
---- | ||
from dulwich import porcelain | ||
porcelain.log('.', max_entries=1) | ||
#commit: 57fbe010446356833a6ad1600059d80b1e731e15 | ||
#Author: Jelmer Vernooij <[email protected]> | ||
#Date: Sat Apr 29 2017 23:57:34 +0000 | ||
----- | ||
---- | ||
|
||
|
||
==== Further Reading | ||
|
||
* The official API documentation is available at https://www.dulwich.io/apidocs/dulwich.html[] | ||
* Official tutorial at https://www.dulwich.io/docs/tutorial[] has many examples of how to do specific tasks with Dulwich | ||
The API documentation, tutorial, and many examples of how to do specific tasks with Dulwich are available on the official website https://www.dulwich.io[]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.