Skip to content

Commit

Permalink
chore: auto update release file
Browse files Browse the repository at this point in the history
  • Loading branch information
billyjacoby committed May 10, 2023
1 parent 78b34b4 commit 2f60fe7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
23 changes: 23 additions & 0 deletions bin/post-bump.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

##? Version has been bumped, so we should create a build here then update the
##? updates.json file with the tar.gz.sig provided. Have to figure out how to target the previous version number here though

echo "Building release..."
yarn build:release

export UPDATE_SIG_FILE="./src-tauri/target/release/bundle/macos/Browsernaut.app.tar.gz.sig"
export UPDATE_SIG=$(cat $UPDATE_SIG_FILE)

export PUBLISH_DATE=$(date -u -Iseconds | sed s/+00:00/Z/ | sed s/,/./)

echo "Updating updates file"

# #? Update the version
sed -i "" "s/$LATEST_VERSION/$VERSION/g" "./updates.json"
# #? Update the signature
sed -i "" "s/\"signature\":.*/\"signature\": \"$UPDATE_SIG\",/" "./updates.json"
#? Update the pubplish date
sed -i "" "s/\"pub_date\":.*/\"pub_date\": \"$PUBLISH_DATE\",/" "./updates.json"

echo "Complete!"
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"sign": "dotenv ./bin/apple.sh",
"preview": "vite preview",
"tauri": "tauri",
"release": "release-it"
"release": "release-it --verbose"
},
"dependencies": {
"@hello-pangea/dnd": "^16.2.0",
Expand Down Expand Up @@ -49,7 +49,7 @@
},
"release-it": {
"hooks": {
"after:bump": "yarn auto-changelog -p"
"after:bump": "yarn auto-changelog -p && VERSION=${version} LATEST_VERSION=${latestVersion} ./bin/post-bump.sh"
},
"git": {
"commitMessage": "chore: release v${version}",
Expand Down
2 changes: 1 addition & 1 deletion updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"pub_date": "2023-05-09T00:00:00Z",
"platforms": {
"darwin-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUUXp0NEROL09DaFFTYUVwUy9vanYxM21pVE1zako3R2RGTUZsWEdLVk9DRS8xU21odWo4WHBtK2JWeWtTcVBCek42eXdJK2cxTTJ1RGNzajRCUUJwMjJ2S0lOaTVUdUF3PQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNjgzNjc2MzI5CWZpbGU6QnJvd3Nlcm5hdXQuYXBwLnRhci5negpIU2lWbWpxbGFKaVNRUUc2cnE2ZlBKRUtkOTh3T3ZzZGVNeG1Fbko5VkNFVmF5UFUzL0tOUXlybjhEQktWYThoZ0NHMFl6dWwwbmZvdTQxY2lZMlhBZz09Cg==",
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUUXp0NEROL09DaFFiQ2szTnY4RmdEbk54M0c3eElyN3NKd1BLWFNQZUlTRHhkWHhLZSt1UWw0bGxzajczSGlKbFhOeXJTbmRjZWNUdWR3UHlQL1FwcERlRW5WZGRGeVFzPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNjgzNzIwMjU3CWZpbGU6QnJvd3Nlcm5hdXQuYXBwLnRhci5negpxSzJ2NTFjUFZBaVBKVFg0akVLMW51dXhjSFZJcDE4WDRvVzI2VVFoQmVQWDdBRzBPNHFYcDV1cnFCNzBuN1NWQk8vR0VSb1NDZVhzRXlPWERkTE1Ddz09Cg==",
"url": "https://github.com/billyjacoby/browsernaut/releases/download/0.0.1-dev.13/Browsernaut.app.tar.gz"
}
}
Expand Down

0 comments on commit 2f60fe7

Please sign in to comment.