-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad4ed6b
commit f937c03
Showing
8 changed files
with
102 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"version": "v0.0.1", | ||
"notes": "Release notes example 2", | ||
"pub_date": "2022-09-27T05:00:54Z", | ||
"platforms": { | ||
"darwin-x86_64": { | ||
"signature": "----", | ||
"url": "template" | ||
}, | ||
"darwin-aarch64": { | ||
"signature": "-----", | ||
"url": "template" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"version": "v0.0.1", | ||
"notes": "Release notes example 2", | ||
"pub_date": "2022-09-27T05:00:54Z", | ||
"platforms": { | ||
"linux-x86_64": { | ||
"signature": "-----", | ||
"url": "template" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,34 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
VERSION=$1 | ||
RELEASE_NOTES="${*:2}" | ||
NOW=$(python -c "import datetime; print(datetime.datetime.now().strftime(\"%Y-%m-%dT%H:%M:%SZ\"))") | ||
|
||
echo "Update version to $VERSION" | ||
|
||
function update_json() { | ||
FILE_NAME=$1 | ||
JSON_PATH=$2 | ||
VALUE=$3 | ||
jq "$JSON_PATH = \"$VALUE\"" <<< $(cat $FILE_NAME) > $FILE_NAME | ||
jq "$JSON_PATH = \"$VALUE\"" <<<$(cat $FILE_NAME) >$FILE_NAME | ||
} | ||
|
||
# Update package.json | ||
update_json package.json ".version" $VERSION | ||
|
||
# Update tauri | ||
update_json src-tauri/tauri.conf.json ".package.version" $VERSION | ||
update_json src-tauri/tauri.conf.json ".package.version" $VERSION | ||
|
||
# Update mac os manifest | ||
update_json manifests/update-darwin.json '.version' "v$VERSION" | ||
update_json manifests/update-darwin.json '.pub_date' "$NOW" | ||
update_json manifests/update-darwin.json '.platforms."darwin-x86_64".url' "https://github.com/andrewinci/insulator2/releases/download/v${VERSION}/Insulator.2.app.tar.gz" | ||
update_json manifests/update-darwin.json '.platforms."darwin-aarch64".url' "https://github.com/andrewinci/insulator2/releases/download/v${VERSION}/Insulator.2.app.tar.gz" | ||
update_json manifests/update-darwin.json ".notes" "$RELEASE_NOTES" | ||
|
||
# Update linux manifest | ||
update_json manifests/update-linux.json '.version' "v$VERSION" | ||
update_json manifests/update-linux.json '.pub_date' "$NOW" | ||
update_json manifests/update-linux.json '.platforms."linux-x86_64".url' "https://github.com/andrewinci/insulator2/releases/download/v${VERSION}/insulator-2_${VERSION}_amd64.AppImage.tar.gz" | ||
update_json manifests/update-linux.json ".notes" "$RELEASE_NOTES" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
function update_json() { | ||
FILE_NAME=$1 | ||
JSON_PATH=$2 | ||
VALUE=$3 | ||
jq "$JSON_PATH = \"$VALUE\"" <<<$(cat $FILE_NAME) >$FILE_NAME | ||
} | ||
|
||
TARGET="$1" | ||
|
||
if [ "$TARGET" == "darwin" ]; then | ||
echo "Updating darwin signatures" | ||
SIG=$(cat "src-tauri/target/release/bundle/macos/Insulator 2.app.tar.gz.sig") | ||
update_json manifests/update-darwin.json '.platforms."darwin-x86_64".signature' "$SIG" | ||
update_json manifests/update-darwin.json '.platforms."darwin-aarch64".signature' "$SIG" | ||
elif [ "$TARGET" == "linux" ]; then | ||
echo "Updating linux signatures" | ||
SIG=$(cat src-tauri/target/release/bundle/appimage/insulator-*_amd64.AppImage.tar.gz.sig) | ||
update_json manifests/update-linux.json '.platforms."linux-x86_64".signature' "$SIG" | ||
else | ||
echo "Invalid target. Specify one of: linux, darwin" | ||
exit 1 | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters