@audius/sdk 0.0.24 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@audius/sdk",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
+ "audius": {
5
+ "releaseSHA": "d754d6ba6db6d33eb43ae473147944c4e579b6b2"
6
+ },
4
7
  "description": "",
5
8
  "main": "dist/index.cjs.js",
6
9
  "module": "dist/index.esm.js",
@@ -16,12 +16,9 @@ fi
16
16
 
17
17
  set -ex
18
18
 
19
- # Finds the lastest commit that looks like a version commit,
20
- # and gets the list of commits after that
19
+ # Generate change log between last released sha and HEAD
21
20
  function git-changelog () {
22
- # Find the latest release commit by using the last time the first `version` key changed
23
- version_line_number=$(grep -m 1 -n version package.json | cut -d: -f 1)
24
- release_commit=$(git blame -L ${version_line_number},+1 --porcelain -- package.json | awk 'NR==1{ print $1 }')
21
+ release_commit=${1}
25
22
 
26
23
  # Print the log as "- <commmiter short date> [<commit short hash>] <commit message> <author name>"
27
24
  git log --pretty=format:"- %cd [%h] %s [%an]" --date=short $release_commit..HEAD
@@ -60,10 +57,14 @@ function bump-npm () {
60
57
  git reset --hard ${GIT_TAG}
61
58
 
62
59
  # grab change log early, before the version bump
63
- CHANGE_LOG=$(git-changelog)
60
+ LAST_RELEASED_SHA=$(jq -r '.audius.releaseSHA' package.json)
61
+ CHANGE_LOG=$(git-changelog ${LAST_RELEASED_SHA})
64
62
 
65
63
  # Patch the version
66
64
  VERSION=$(npm version patch)
65
+ tmp=$(mktemp)
66
+ jq ". += {audius: {releaseSHA: \"${GIT_TAG}\"}}" package.json > "$tmp" \
67
+ && mv "$tmp" package.json
67
68
 
68
69
  # Build project
69
70
  npm i