Skip to content

Commit

Permalink
BE-655 Create script for generating change log
Browse files Browse the repository at this point in the history
- Based on fabric/scripts/changelog.sh
- Usage: In case of v0.3.9.4 release, please follow as below:

   ./scripts/changelog.sh 6d96c9c v0.3.9.4
    # "6d96c9c" is the commit hash of v0.3.9.3 release

- Put together script files for the miscellaneous tasks under scripts directory

Change-Id: I3d96448a006f7864712001d23b33bcab90ba11d1
Signed-off-by: Atsushi Neki <atsushin@fast.au.fujitsu.com>
  • Loading branch information
nekia committed Jun 14, 2019
1 parent 970258b commit cd4ebf0
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## v0.3.9.3

* [46ae8e3](https://github.com/hyperledger/blockchain-explorer/commit/46ae8e3) [BE-647](https://jira.hyperledger.org/browse/BE-647) pgservice fix
* [9277c2c](https://github.com/hyperledger/blockchain-explorer/commit/9277c2c) [BE-647](https://jira.hyperledger.org/browse/BE-647) - PgService fix
* [a2b753f](https://github.com/hyperledger/blockchain-explorer/commit/a2b753f) [BE-647](https://jira.hyperledger.org/browse/BE-647) pgservice fix

## v0.3.9.2

* [e9e9f64](https://github.com/hyperledger/blockchain-explorer/commit/e9e9f64) [BE-645](https://jira.hyperledger.org/browse/BE-645) Update insecure python packages
* [73e1ecf](https://github.com/hyperledger/blockchain-explorer/commit/73e1ecf) [BE-567](https://jira.hyperledger.org/browse/BE-567) explorer exposed on port 8080 instead of 8090

## v0.3.9.1

* [fa36248](https://github.com/hyperledger/blockchain-explorer/commit/fa36248) [BE-563](https://jira.hyperledger.org/browse/BE-563) Fix docker publish images


<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"lint": "eslint .",
"linter": "eslint",
"lint:fix": "eslint . --fix",
"precommit": "lint-staged && ./verify-license.sh",
"precommit": "lint-staged && ./scripts/verify-license.sh",
"e2e-test-check-tool": "/bin/bash -c 'if [[ -z $(which configtxgen) ]]; then echo \"### Need to install tools ###\n\"; exit -1; fi'",
"e2e-test-check-img": "/bin/bash -c 'if [[ -z $(docker images -q hyperledger/fabric-peer:latest) ]]; then echo \"### Need to pull fabric images ###\n\"; exit -1; fi'",
"e2e-test-setup-tool:ci": "/bin/bash -c 'mkdir fabric-samples; pushd fabric-samples; curl -sSL https://raw.githubusercontent.com/hyperledger/fabric-samples/release-1.4/scripts/bootstrap.sh | bash -s; popd'",
Expand Down
15 changes: 15 additions & 0 deletions scripts/changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

cat > CHANGELOG.new << EOF
## ${2}
$(git log "$1..HEAD" --oneline | grep -v Merge | sed -e "s/\[\(BE-[0-9]*\)\]/\[\1\](https:\/\/jira.hyperledger.org\/browse\/\1\)/" -e "s/ \(BE-[0-9]*\)/ \[\1\](https:\/\/jira.hyperledger.org\/browse\/\1\)/" -e "s/\([0-9|a-z]*\)/* \[\1\](https:\/\/github.com\/hyperledger\/blockchain-explorer\/commit\/\1)/")
EOF
cat CHANGELOG.md >> CHANGELOG.new
mv -f CHANGELOG.new CHANGELOG.md
2 changes: 1 addition & 1 deletion verify-license.sh → scripts/verify-license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ else
fi

# If you want to exclude some paths, add a keyword with an extended regular expression format to excluded_paths
excluded_paths="\.ico$ \.jpg$ \.json$ \.png$ \.svg$ \.tx$ \.crt$ \.ya*ml$ \.key$ \.pem$ _sk$ \/META-INF\/ LICENSE$ \.xml$"
excluded_paths="\.ico$ \.jpg$ \.json$ \.png$ \.svg$ \.tx$ \.crt$ \.ya*ml$ \.key$ \.pem$ _sk$ \/META-INF\/ LICENSE$ \.xml$ CHANGELOG\.md$"

for check_file in ${check_files}; do

Expand Down

0 comments on commit cd4ebf0

Please sign in to comment.