diff --git a/bin/release.sh b/bin/release.sh index 30dc5039..1f26a818 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -1,18 +1,28 @@ #!/usr/bin/env bash -cd `dirname $0`/.. -APP=`sds -rp name` -VERSION=`sds -rp version` +DIR=`dirname $0` +BIN=$DIR/../node_modules/.bin +SDS=$BIN/sds +cd $DIR/.. + +APP=`$SDS -rp name` +VERSION=`$SDS version` VVERSION=v$VERSION -USER=`sds -rp author` +USER=`$SDS author` DMG=$APP-$VERSION.dmg -echo 'tag and push ...' -# git tag $VVERSION && git push --tags - -echo 'creating release ...' -github-release release --user $USER --repo $APP --tag $VVERSION --name $VVERSION --pre-release - -echo 'uploading dmg ...' -github-release upload --user $USER --repo $APP --tag $VVERSION --name $DMG --file $DMG +if $BIN/konrad --commit $VVERSION; then + source ~/.tokens + echo 'using token' $GH_TOKEN + + ./bin/buildmac.sh + ./bin/dmg.sh + + echo 'creating release ...' + github-release release -s $GH_TOKEN --user $USER --repo $APP --tag $VVERSION-mac --name "$VVERSION macOS" --pre-release + + echo 'uploading dmg ...' + github-release upload -s $GH_TOKEN --user $USER --repo $APP --tag $VVERSION-mac --name $DMG --file $DMG + +fi diff --git a/package.json b/package.json index ceb47584..40be905a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ko", "productName": "ko", - "version": "0.232.0", + "version": "0.235.0", "description": "text editor", "main": "js/main/main.js", "preferGlobal": true, @@ -51,6 +51,7 @@ "electron-packager": "^13.1.1", "electron-rebuild": "^1.8.5", "koffee": "^0.56.0", - "konrad": "^0.129.0" + "konrad": "^0.130.0", + "sds": "^2.1.1" } -} +} \ No newline at end of file diff --git a/package.noon b/package.noon index c3c5f975..247ec7ff 100644 --- a/package.noon +++ b/package.noon @@ -1,6 +1,6 @@ name ko productName ko -version 0.232.0 +version 0.235.0 description text editor main js/main/main.js preferGlobal true @@ -41,6 +41,6 @@ devDependencies electron ^5.0.2 electron-packager ^13.1.1 electron-rebuild ^1.8.5 - github-release ^0.2.0 koffee ^0.56.0 - konrad ^0.129.0 \ No newline at end of file + konrad ^0.130.0 + sds ^2.1.1 \ No newline at end of file