mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 21:53:26 +00:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f78747d841 | ||
|
|
cae953420d | ||
|
|
693d3d8994 | ||
|
|
20997d51a5 | ||
|
|
125c23f19b | ||
|
|
6692416fd4 | ||
|
|
e13187cb1d | ||
|
|
89200f3109 | ||
|
|
136773481e | ||
|
|
de7d2fab7c | ||
|
|
1b1fa93cf6 | ||
|
|
7e31ba4103 | ||
|
|
34b7a80a78 | ||
|
|
ba6c7eceec | ||
|
|
5669f792a7 | ||
|
|
f864b5c324 | ||
|
|
c8ff81e79a | ||
|
|
2bcaabdab4 | ||
|
|
4faa595b04 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
|
||||
env:
|
||||
GEMS_PATH: ~/vendor/bundle
|
||||
GEMS_PATH: vendor/bundle
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
2
.github/workflows/pages-deploy.yml.hook
vendored
2
.github/workflows/pages-deploy.yml.hook
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
GEMS_PATH: ~/vendor/bundle
|
||||
GEMS_PATH: vendor/bundle
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
54
.travis.yml
54
.travis.yml
@@ -1,36 +1,50 @@
|
||||
os: linux
|
||||
dist: bionic
|
||||
|
||||
language: ruby
|
||||
rvm: 2.7.0
|
||||
language: minimal
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $TRAVIS_BUILD_DIR/vendor/bundle
|
||||
jobs:
|
||||
include:
|
||||
|
||||
before_install:
|
||||
- gem install bundler:2.2.4 # match the Gemfile.lock, travis' bundle is 2.1.2
|
||||
- bundle config path 'vendor/bundle'
|
||||
- name: CD
|
||||
language: ruby
|
||||
rvm: 2.7.0
|
||||
|
||||
install:
|
||||
# overriding to drop the travis `--development` flag
|
||||
- bundle install --jobs=3 --retry=3
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
# required to avoid SSL error (for htmlproofer)
|
||||
- libcurl4-openssl-dev
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libcurl4-openssl-dev # required to avoid SSL error (for htmlproofer)
|
||||
cache:
|
||||
directories:
|
||||
- $TRAVIS_BUILD_DIR/vendor/bundle
|
||||
|
||||
script:
|
||||
before_install:
|
||||
# match the Gemfile.lock, travis' bundler is 2.1.2
|
||||
- gem install bundler:2.2.4
|
||||
- bundle config path 'vendor/bundle'
|
||||
|
||||
install:
|
||||
# overriding to drop the travis `--development` flag
|
||||
- bundle install --jobs=3 --retry=3
|
||||
|
||||
script:
|
||||
- eval "$BUILD_CMD"
|
||||
|
||||
git:
|
||||
depth: false # for posts' lastmod
|
||||
|
||||
- name: Flush Starter
|
||||
script:
|
||||
- eval "$FLUSH_STARTER"
|
||||
|
||||
before_script:
|
||||
- git -C "$HOME" clone "$BUILDER_REPO" --depth=1 -q
|
||||
- eval "$BUILD_CMD"
|
||||
|
||||
branches:
|
||||
only: /.*-stable$/
|
||||
|
||||
git:
|
||||
depth: false # for posts lastmod
|
||||
|
||||
notifications:
|
||||
email:
|
||||
recipients:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
jekyll-theme-chirpy (3.1.1)
|
||||
jekyll-theme-chirpy (3.2.2)
|
||||
jekyll (~> 4.1)
|
||||
jekyll-archives (~> 2.2)
|
||||
jekyll-paginate (~> 1.1)
|
||||
@@ -33,7 +33,7 @@ GEM
|
||||
typhoeus (~> 1.3)
|
||||
yell (~> 2.0)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (1.8.7)
|
||||
i18n (1.8.8)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (4.2.0)
|
||||
addressable (~> 2.4)
|
||||
|
||||
34
README.md
34
README.md
@@ -5,7 +5,7 @@ Language: English | [简体中文](https://github.com/cotes2020/jekyll-theme-chi
|
||||
[](https://rubygems.org/gems/jekyll-theme-chirpy)
|
||||
[](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush)
|
||||
[](https://app.codacy.com/manual/cotes2020/jekyll-theme-chirpy?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade_Dashboard)
|
||||
[](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
|
||||
[](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
|
||||
[](https://996.icu)
|
||||
|
||||
A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation. Designed to help you record and share your knowledge easily. [Live Demo »](https://chirpy.cotes.info)
|
||||
@@ -21,7 +21,7 @@ A minimal, sidebar, responsive web design Jekyll theme that focuses on text pres
|
||||
- [Documentation](#documentation)
|
||||
- [Contributing](#contributing)
|
||||
- [Credits](#credits)
|
||||
- [Supporting](#supporting)
|
||||
- [Support](#support)
|
||||
- [License](#license)
|
||||
|
||||
## Features
|
||||
@@ -50,10 +50,10 @@ Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete th
|
||||
|
||||
There are two ways to get the theme:
|
||||
|
||||
- **Install from RubyGems** - Easy to upgrade, isolate irrelevant project files so you can focus on writing.
|
||||
- **Fork from GitHub** - Convenient for custom development, but difficult to upgrade, only suitable for web developers.
|
||||
- **Install from RubyGems** - Easy to update, isolate irrelevant project files so you can focus on writing.
|
||||
- **Fork on GitHub** - Convenient for custom development, but difficult to update, only suitable for web developers.
|
||||
|
||||
### Install From RubyGems
|
||||
### Installing the Theme Gem
|
||||
|
||||
Add this line to your Jekyll site's `Gemfile`:
|
||||
|
||||
@@ -77,15 +77,15 @@ Finally, copy the required files from the theme's gem (for detailed files, see [
|
||||
|
||||
> **Hint**: To locate the installed theme’s gem, execute:
|
||||
>
|
||||
```console
|
||||
$ bundle info --path jekyll-theme-chirpy
|
||||
```
|
||||
> ```console
|
||||
> $ bundle info --path jekyll-theme-chirpy
|
||||
> ```
|
||||
|
||||
Or you can [**use the starter template**][use-starter] to create a Jekyll site to save time copying files from theme's gem. We have prepared everything for you there!
|
||||
|
||||
### Fork From GitHub
|
||||
### Fork on GitHub
|
||||
|
||||
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) from GitHub and clone your fork to local.
|
||||
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub and then clone your fork to local. (Please note that the default branch code is in development. If you want the blog to be stable, please switch to the [latest tag](https://github.com/cotes2020/jekyll-theme-chirpy/tags) and start writing.)
|
||||
|
||||
Install gem dependencies by:
|
||||
|
||||
@@ -209,9 +209,13 @@ Also, thank [JetBrains][jb] for providing the open source license.
|
||||
|
||||
[][jb]
|
||||
|
||||
## Supporting
|
||||
## Support
|
||||
|
||||
If you enjoy this theme or find it helpful, please consider becoming my sponsor, I'd really appreciate it! Click the button <kbd>:heart: Sponsor</kbd> at the top of the [Home Page](https://github.com/cotes2020/jekyll-theme-chirpy) and choose a link that suits you to donate; this will encourage and help me better maintain the project.
|
||||
If you like this theme or find it helpful, please consider sponsoring me, because it will encourage and help me better maintain the project, I will be very grateful!
|
||||
|
||||
[](https://www.buymeacoffee.com/coteschung)
|
||||
[][cn-donation]
|
||||
[][cn-donation]
|
||||
|
||||
## License
|
||||
|
||||
@@ -220,5 +224,9 @@ This work is published under [MIT](https://github.com/cotes2020/jekyll-theme-chi
|
||||
[starter]: https://github.com/cotes2020/chirpy-starter
|
||||
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
|
||||
[workflow]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
||||
[jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
|
||||
|
||||
<!-- ReadMe links -->
|
||||
|
||||
[jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
|
||||
[cn-donation]: https://cotes.gitee.io/alipay-wechat-donation/
|
||||
|
||||
|
||||
@@ -154,7 +154,8 @@ exclude:
|
||||
- vendor
|
||||
- Gemfile
|
||||
- Gemfile.lock
|
||||
- jekyll-theme-chirpy.gemspec
|
||||
- '*.gem'
|
||||
- '*.gemspec'
|
||||
- tools
|
||||
- docs
|
||||
- README.md
|
||||
|
||||
@@ -15,10 +15,10 @@ Follow the [Jekyll Docs](https://jekyllrb.com/docs/installation/) to complete th
|
||||
|
||||
There are two ways to get the theme:
|
||||
|
||||
- **Install from RubyGems** - Easy to upgrade, isolate irrelevant project files so you can focus on writing.
|
||||
- **Fork from GitHub** - Convenient for custom development, but difficult to upgrade, only suitable for web developers.
|
||||
- **Install from RubyGems** - Easy to update, isolate irrelevant project files so you can focus on writing.
|
||||
- **Fork on GitHub** - Convenient for custom development, but difficult to update, only suitable for web developers.
|
||||
|
||||
### Install From RubyGems
|
||||
### Installing the Theme Gem
|
||||
|
||||
Add this line to your Jekyll site's `Gemfile`:
|
||||
|
||||
@@ -42,15 +42,15 @@ Finally, copy the required files from the theme's gem (for detailed files, see [
|
||||
|
||||
> **Hint**: To locate the installed theme’s gem, execute:
|
||||
>
|
||||
```console
|
||||
$ bundle info --path jekyll-theme-chirpy
|
||||
```
|
||||
> ```console
|
||||
> $ bundle info --path jekyll-theme-chirpy
|
||||
> ```
|
||||
|
||||
Or you can [**use the starter template**][use-starter] to create a Jekyll site to save time copying files from theme's gem. We have prepared everything for you there!
|
||||
|
||||
### Fork From GitHub
|
||||
### Fork on GitHub
|
||||
|
||||
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) from GitHub and clone your fork to local.
|
||||
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub and then clone your fork to local. (Please note that the default branch code is in development. If you want the blog to be stable, please switch to the [latest tag](https://github.com/cotes2020/jekyll-theme-chirpy/tags) and start writing.)
|
||||
|
||||
Install gem dependencies by:
|
||||
|
||||
|
||||
@@ -941,7 +941,7 @@ $sidebar-display: "sidebar-display";
|
||||
}
|
||||
|
||||
> div {
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 1rem;
|
||||
@@ -1390,7 +1390,7 @@ $sidebar-display: "sidebar-display";
|
||||
}
|
||||
|
||||
#search-results > div {
|
||||
max-width: 46%;
|
||||
width: 46%;
|
||||
&:nth-child(odd) {
|
||||
margin-right: 1.5rem;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ div {
|
||||
div[class^='language-']::before {
|
||||
content: attr(lang);
|
||||
position: absolute;
|
||||
right: 1.8rem;
|
||||
right: 2rem;
|
||||
margin-top: 3px;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 600;
|
||||
@@ -170,3 +170,9 @@ div[class^='language-']::before {
|
||||
right: 3.1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1650px) {
|
||||
div[class^='language-']::before {
|
||||
right: 3.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* The styles for Jekyll theme Chirpy
|
||||
*
|
||||
* Chirpy v3.1.1 (https://github.com/cotes2020/jekyll-theme-chirpy)
|
||||
* Chirpy v3.2.2 (https://github.com/cotes2020/jekyll-theme-chirpy)
|
||||
* © 2019 Cotes Chung
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
@@ -66,11 +66,13 @@
|
||||
@include btn-post-nav;
|
||||
|
||||
color: var(--link-color);
|
||||
|
||||
&:hover {
|
||||
background: #2a408e;
|
||||
color: #fff;
|
||||
border-color: #2a408e;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
@include btn-post-nav;
|
||||
|
||||
@@ -78,19 +80,34 @@
|
||||
cursor: not-allowed;
|
||||
background: none;
|
||||
color: gray;
|
||||
|
||||
&:hover {
|
||||
border-color: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.btn-outline-primary.disabled:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
&::before {
|
||||
color: var(--text-muted-color);
|
||||
font-size: 0.65rem;
|
||||
text-transform: uppercase;
|
||||
content: attr(prompt);
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
left: 0.5px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
right: 0.5px;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
@@ -100,19 +117,6 @@
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
a {
|
||||
&:first-child {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
left: 0.5px;
|
||||
}
|
||||
&:last-child {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
right: 0.5px;
|
||||
}
|
||||
}
|
||||
|
||||
} // .post-navigation
|
||||
|
||||
@keyframes fade-up {
|
||||
@@ -226,10 +230,6 @@
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
|
||||
i {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.share-icons {
|
||||
font-size: 1.2rem;
|
||||
a {
|
||||
@@ -337,12 +337,6 @@
|
||||
} // .post
|
||||
}
|
||||
|
||||
@media all and (min-width: 768px) and (max-width: 830px) {
|
||||
.post img {
|
||||
max-width: calc(100% + 2rem);
|
||||
}
|
||||
}
|
||||
|
||||
/* Hide SideBar and TOC */
|
||||
@media all and (max-width: 830px) {
|
||||
.post-navigation {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Chirpy v3.1.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||
* Chirpy v3.2.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||
* © 2019 Cotes Chung
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
2
assets/js/dist/categories.min.js
vendored
2
assets/js/dist/categories.min.js
vendored
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Chirpy v3.1.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||
* Chirpy v3.2.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||
* © 2019 Cotes Chung
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
2
assets/js/dist/home.min.js
vendored
2
assets/js/dist/home.min.js
vendored
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Chirpy v3.1.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||
* Chirpy v3.2.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||
* © 2019 Cotes Chung
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
2
assets/js/dist/page.min.js
vendored
2
assets/js/dist/page.min.js
vendored
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Chirpy v3.1.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||
* Chirpy v3.2.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||
* © 2019 Cotes Chung
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
2
assets/js/dist/post.min.js
vendored
2
assets/js/dist/post.min.js
vendored
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Chirpy v3.1.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||
* Chirpy v3.2.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||
* © 2019 Cotes Chung
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
2
assets/js/dist/pvreport.min.js
vendored
2
assets/js/dist/pvreport.min.js
vendored
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Chirpy v3.1.1 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||
* Chirpy v3.2.2 (https://github.com/cotes2020/jekyll-theme-chirpy/)
|
||||
* © 2019 Cotes Chung
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@ Language: [English](https://github.com/cotes2020/jekyll-theme-chirpy#readme) |
|
||||
[](https://rubygems.org/gems/jekyll-theme-chirpy)
|
||||
[](https://github.com/cotes2020/jekyll-theme-chirpy/actions?query=branch%3Amaster+event%3Apush)
|
||||
[](https://app.codacy.com/manual/cotes2020/jekyll-theme-chirpy?utm_source=github.com&utm_medium=referral&utm_content=cotes2020/jekyll-theme-chirpy&utm_campaign=Badge_Grade_Dashboard)
|
||||
[](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
|
||||
[](https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE)
|
||||
[](https://996.icu)
|
||||
|
||||
一个不一样的 Jekyll 主题,采用响应式设计,方便记录、管理、分享您的知识和经验。[懂的进 »](https://chirpy.cotes.info)
|
||||
@@ -90,7 +90,7 @@ $ bundle info --path jekyll-theme-chirpy
|
||||
|
||||
### 在 GitHub 上 Fork
|
||||
|
||||
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) 然后克隆到本地。
|
||||
[Fork **Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) 然后克隆到本地。(友情提示:默认分支的代码处于开发状态,如果您想博客更加稳定,请切换到最新的 [Tag](https://github.com/cotes2020/jekyll-theme-chirpy/tags) 开始写作。)
|
||||
|
||||
安装依赖:
|
||||
|
||||
@@ -214,7 +214,11 @@ $ docker run -it --rm \
|
||||
|
||||
## 赞助
|
||||
|
||||
如果您喜欢这个主题或者它对您有帮助,请考虑打赏作者:在 [项目主页](https://github.com/cotes2020/jekyll-theme-chirpy) 点击按钮 <kbd>:heart: Sponsor</kbd> 选择适合的链接即可完成(国内一般选第二个链接,支付宝/微信赞助),您的打赏将会极大地鼓励作者,并帮助作者更好地维护项目!
|
||||
如果您喜欢这个主题或者它对您有帮助,请考虑打赏作者,您的支持将会极大地鼓励作者,并帮助作者更好地维护项目!
|
||||
|
||||
[](https://www.buymeacoffee.com/coteschung)
|
||||
[][cn-donation]
|
||||
[][cn-donation]
|
||||
|
||||
## 许可证书
|
||||
|
||||
@@ -223,4 +227,8 @@ $ docker run -it --rm \
|
||||
[starter]: https://github.com/cotes2020/chirpy-starter
|
||||
[use-starter]: https://github.com/cotes2020/chirpy-starter/generate
|
||||
[workflow]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook
|
||||
|
||||
<!-- ReadMe links -->
|
||||
|
||||
[jb]: https://www.jetbrains.com/?from=jekyll-theme-chirpy
|
||||
[cn-donation]: https://cotes.gitee.io/alipay-wechat-donation/
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "jekyll-theme-chirpy"
|
||||
spec.version = "3.1.1"
|
||||
spec.version = "3.2.2"
|
||||
spec.authors = ["Cotes Chung"]
|
||||
spec.email = ["cotes.chung@gmail.com"]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jekyll-theme-chirpy",
|
||||
"version": "3.1.1",
|
||||
"version": "3.2.2",
|
||||
"description": "A minimal, sidebar, responsive web design Jekyll theme that focuses on text presentation.",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
#
|
||||
# 2. Create a git-tag on release branch
|
||||
#
|
||||
# 3. Build a rubygem package
|
||||
# 3. Build a RubyGems package base on the latest git-tag
|
||||
#
|
||||
#
|
||||
# Requires: gulp, rubygem
|
||||
# Requires: Git, Gulp, RubyGems
|
||||
|
||||
set -eu
|
||||
|
||||
auto_release=true
|
||||
manual_release=false
|
||||
|
||||
ASSETS=(
|
||||
"_sass/jekyll-theme-chirpy.scss"
|
||||
@@ -58,9 +58,8 @@ check() {
|
||||
}
|
||||
|
||||
_bump_assets() {
|
||||
_version="$1"
|
||||
for i in "${!ASSETS[@]}"; do
|
||||
sed -i "s/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/v$_version/" "${ASSETS[$i]}"
|
||||
sed -i "s/v[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/v$1/" "${ASSETS[$i]}"
|
||||
done
|
||||
|
||||
gulp
|
||||
@@ -118,21 +117,33 @@ release() {
|
||||
|
||||
_release_branch="$_major-$_minor-stable"
|
||||
|
||||
if $manual_release; then
|
||||
echo -e "Bump version to $_version (manual release)\n"
|
||||
bump "$_version"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -z $(git branch -v | grep "$_release_branch") ]]; then
|
||||
git checkout -b "$_release_branch"
|
||||
else
|
||||
git checkout "$_release_branch"
|
||||
# cherry-pick the latest 2 commit from master to release branch
|
||||
git cherry-pick "$(git rev-parse master~1)" "$(git rev-parse master)"
|
||||
# cherry-pick the latest commit from master branch to release branch
|
||||
git cherry-pick "$(git rev-parse master)"
|
||||
fi
|
||||
|
||||
echo -e "Bump version to $_version\n"
|
||||
bump "$_version"
|
||||
|
||||
echo -e "Create tag v$_version\n"
|
||||
git tag "v$_version"
|
||||
|
||||
echo -e "Build the gem pakcage for v$_version\n"
|
||||
build_gem
|
||||
|
||||
# head back to master branch
|
||||
git checkout master
|
||||
# cherry-pick the latest commit from release branch to master branch
|
||||
git cherry-pick "$_release_branch" -x
|
||||
|
||||
}
|
||||
|
||||
@@ -152,16 +163,10 @@ main() {
|
||||
exit -1
|
||||
fi
|
||||
|
||||
echo -e "Bump version to $_version\n"
|
||||
bump "$_version"
|
||||
|
||||
echo -e "Release to v$_version\n"
|
||||
|
||||
if $auto_release; then
|
||||
release "$_version"
|
||||
fi
|
||||
release "$_version"
|
||||
|
||||
else
|
||||
|
||||
echo "Error: Illegal version number: '$_version'"
|
||||
fi
|
||||
|
||||
@@ -171,7 +176,7 @@ while (($#)); do
|
||||
opt="$1"
|
||||
case $opt in
|
||||
-m | --manual)
|
||||
auto_release=false
|
||||
manual_release=true
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user