mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
22 lines
372 B
Bash
Executable File
22 lines
372 B
Bash
Executable File
#! /usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
# To make it work on OSX (provided gnu-sed in installed)
|
|
if type gsed
|
|
then
|
|
sed=gsed
|
|
fi
|
|
|
|
|
|
version=$(jq --raw-output ' .version ' "package.json")
|
|
date=$(date +%Y-%m-%d)
|
|
|
|
$sed \
|
|
--regexp-extended \
|
|
--in-place="" \
|
|
"s$^## \[Unreleased\]$\## [Unreleased\]\n\n\n## [${version}] - ${date}$" \
|
|
CHANGELOG.md
|
|
|
|
git add CHANGELOG.md
|