We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25dd38b commit cc68536Copy full SHA for cc68536
1 file changed
tools/bump-version.sh
@@ -0,0 +1,28 @@
1
+#!/usr/bin/env bash
2
+#
3
+# Bump latest version to file `_data/meta.yml`
4
5
+# v2.5.1
6
+# https://github.com/cotes2020/jekyll-theme-chirpy
7
+# © 2020 Cotes Chung
8
+# Published under MIT License
9
+
10
+set -eu
11
12
+META_FILE="_data/meta.yml"
13
14
+_latest_tag="$(git describe --abbrev=0)"
15
16
+_version_field="version: $_latest_tag"
17
18
+if [[ ! -f $META_FILE ]]; then
19
+ echo "name: Chirpy" > $META_FILE
20
+ echo "$_version_field" >> $META_FILE
21
+else
22
+ sed -i "s/^version:.*/$_version_field/g" $META_FILE
23
+fi
24
25
+if [[ -n $(git status $META_FILE -s) ]]; then
26
+ git add $META_FILE
27
+ git commit -m "Bump version to $_latest_tag"
28
0 commit comments