-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Showing
11 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
Empty file.
Empty file.
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 +1 @@ | ||
<!DOCTYPE html><html><head><meta charSet="utf-8" class="next-head"/><link rel="preload" href="/_next/static/VhSEXTA_sY1ZofYXuRiop/pages/404.js" as="script"/><link rel="preload" href="/_next/static/VhSEXTA_sY1ZofYXuRiop/pages/_app.js" as="script"/><link rel="preload" href="/_next/static/VhSEXTA_sY1ZofYXuRiop/pages/_error.js" as="script"/><link rel="preload" href="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" as="script"/><link rel="preload" href="/_next/static/chunks/commons.607563dfda4be1bfab75.js" as="script"/><link rel="preload" href="/_next/static/runtime/main-58f0623ae31923c6e6ec.js" as="script"/></head><body><div id="__next"><div data-reactroot="">404</div></div><script>__NEXT_DATA__ = {"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"VhSEXTA_sY1ZofYXuRiop","nextExport":true};__NEXT_LOADED_PAGES__=[];__NEXT_REGISTER_PAGE=function(r,f){__NEXT_LOADED_PAGES__.push([r, f])}</script><script async="" id="__NEXT_PAGE__/404" src="/_next/static/VhSEXTA_sY1ZofYXuRiop/pages/404.js"></script><script async="" id="__NEXT_PAGE__/_app" src="/_next/static/VhSEXTA_sY1ZofYXuRiop/pages/_app.js"></script><script async="" id="__NEXT_PAGE__/_error" src="/_next/static/VhSEXTA_sY1ZofYXuRiop/pages/_error.js"></script><script src="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" async=""></script><script src="/_next/static/chunks/commons.607563dfda4be1bfab75.js" async=""></script><script src="/_next/static/runtime/main-58f0623ae31923c6e6ec.js" async=""></script></body></html> | ||
<!DOCTYPE html><html><head><meta charSet="utf-8" class="next-head"/><link rel="preload" href="/_next/static/cfr11ZXJI1UW5F2KqXMyK/pages/404.js" as="script"/><link rel="preload" href="/_next/static/cfr11ZXJI1UW5F2KqXMyK/pages/_app.js" as="script"/><link rel="preload" href="/_next/static/cfr11ZXJI1UW5F2KqXMyK/pages/_error.js" as="script"/><link rel="preload" href="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" as="script"/><link rel="preload" href="/_next/static/chunks/commons.607563dfda4be1bfab75.js" as="script"/><link rel="preload" href="/_next/static/runtime/main-58f0623ae31923c6e6ec.js" as="script"/></head><body><div id="__next"><div data-reactroot="">404</div></div><script>__NEXT_DATA__ = {"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"cfr11ZXJI1UW5F2KqXMyK","nextExport":true};__NEXT_LOADED_PAGES__=[];__NEXT_REGISTER_PAGE=function(r,f){__NEXT_LOADED_PAGES__.push([r, f])}</script><script async="" id="__NEXT_PAGE__/404" src="/_next/static/cfr11ZXJI1UW5F2KqXMyK/pages/404.js"></script><script async="" id="__NEXT_PAGE__/_app" src="/_next/static/cfr11ZXJI1UW5F2KqXMyK/pages/_app.js"></script><script async="" id="__NEXT_PAGE__/_error" src="/_next/static/cfr11ZXJI1UW5F2KqXMyK/pages/_error.js"></script><script src="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" async=""></script><script src="/_next/static/chunks/commons.607563dfda4be1bfab75.js" async=""></script><script src="/_next/static/runtime/main-58f0623ae31923c6e6ec.js" async=""></script></body></html> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 +1 @@ | ||
<!DOCTYPE html><html><head><meta charSet="utf-8" class="next-head"/><title class="next-head">「Preview Page」</title><link rel="shortcut icon" type="image/ico" href="/_static/favicon.ico" class="next-head"/><link rel="stylesheet" href="/_static/markdown.css" class="next-head"/><link rel="stylesheet" href="/_static/highlight.css" class="next-head"/><link rel="stylesheet" href="/_static/[email protected]" class="next-head"/><script type="text/javascript" src="/_static/tweenlite.min.js" class="next-head"></script><link rel="preload" href="/_next/static/VhSEXTA_sY1ZofYXuRiop/pages/index.js" as="script"/><link rel="preload" href="/_next/static/VhSEXTA_sY1ZofYXuRiop/pages/_app.js" as="script"/><link rel="preload" href="/_next/static/VhSEXTA_sY1ZofYXuRiop/pages/_error.js" as="script"/><link rel="preload" href="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" as="script"/><link rel="preload" href="/_next/static/chunks/commons.607563dfda4be1bfab75.js" as="script"/><link rel="preload" href="/_next/static/runtime/main-58f0623ae31923c6e6ec.js" as="script"/></head><body><div id="__next"><section class="markdown-body"></section></div><script>__NEXT_DATA__ = {"props":{"pageProps":{}},"page":"/","query":{},"buildId":"VhSEXTA_sY1ZofYXuRiop","nextExport":true};__NEXT_LOADED_PAGES__=[];__NEXT_REGISTER_PAGE=function(r,f){__NEXT_LOADED_PAGES__.push([r, f])}</script><script async="" id="__NEXT_PAGE__/" src="/_next/static/VhSEXTA_sY1ZofYXuRiop/pages/index.js"></script><script async="" id="__NEXT_PAGE__/_app" src="/_next/static/VhSEXTA_sY1ZofYXuRiop/pages/_app.js"></script><script async="" id="__NEXT_PAGE__/_error" src="/_next/static/VhSEXTA_sY1ZofYXuRiop/pages/_error.js"></script><script src="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" async=""></script><script src="/_next/static/chunks/commons.607563dfda4be1bfab75.js" async=""></script><script src="/_next/static/runtime/main-58f0623ae31923c6e6ec.js" async=""></script></body></html> | ||
<!DOCTYPE html><html><head><meta charSet="utf-8" class="next-head"/><title class="next-head">「Preview Page」</title><link rel="shortcut icon" type="image/ico" href="/_static/favicon.ico" class="next-head"/><link rel="stylesheet" href="/_static/markdown.css" class="next-head"/><link rel="stylesheet" href="/_static/highlight.css" class="next-head"/><link rel="stylesheet" href="/_static/[email protected]" class="next-head"/><script type="text/javascript" src="/_static/tweenlite.min.js" class="next-head"></script><link rel="preload" href="/_next/static/cfr11ZXJI1UW5F2KqXMyK/pages/index.js" as="script"/><link rel="preload" href="/_next/static/cfr11ZXJI1UW5F2KqXMyK/pages/_app.js" as="script"/><link rel="preload" href="/_next/static/cfr11ZXJI1UW5F2KqXMyK/pages/_error.js" as="script"/><link rel="preload" href="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" as="script"/><link rel="preload" href="/_next/static/chunks/commons.607563dfda4be1bfab75.js" as="script"/><link rel="preload" href="/_next/static/runtime/main-58f0623ae31923c6e6ec.js" as="script"/></head><body><div id="__next"><section class="markdown-body"></section></div><script>__NEXT_DATA__ = {"props":{"pageProps":{}},"page":"/","query":{},"buildId":"cfr11ZXJI1UW5F2KqXMyK","nextExport":true};__NEXT_LOADED_PAGES__=[];__NEXT_REGISTER_PAGE=function(r,f){__NEXT_LOADED_PAGES__.push([r, f])}</script><script async="" id="__NEXT_PAGE__/" src="/_next/static/cfr11ZXJI1UW5F2KqXMyK/pages/index.js"></script><script async="" id="__NEXT_PAGE__/_app" src="/_next/static/cfr11ZXJI1UW5F2KqXMyK/pages/_app.js"></script><script async="" id="__NEXT_PAGE__/_error" src="/_next/static/cfr11ZXJI1UW5F2KqXMyK/pages/_error.js"></script><script src="/_next/static/runtime/webpack-42652fa8b82c329c0559.js" async=""></script><script src="/_next/static/chunks/commons.607563dfda4be1bfab75.js" async=""></script><script src="/_next/static/runtime/main-58f0623ae31923c6e6ec.js" async=""></script></body></html> |
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,49 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
[ "$TRACE" ] && set -x | ||
|
||
# Create tag and push | ||
tag="v$(node -p "require('./package.json').version")" | ||
git tag -f "$tag" -m "Release $tag" | ||
git push --tags | ||
|
||
GH_API="https://api.github.com" | ||
GH_REPO="$GH_API/repos/iamcco/markdown-preview.nvim" | ||
GH_TAGS="$GH_REPO/releases/tags/$tag" | ||
AUTH="Authorization: token $GITHUB_API_TOKEN" | ||
|
||
echo "Creating release for $tag" | ||
curl -X POST -H "Authorization: token $GITHUB_API_TOKEN" \ | ||
-H "Content-Type: application/json" \ | ||
--data "{\"tag_name\":\"$tag\"}" \ | ||
"$GH_REPO/releases" | ||
|
||
# upload assets | ||
cd ./app/bin | ||
tar -zcf markdown-preview-macos.tar.gz markdown-preview-macos | ||
tar -zcf markdown-preview-linux.tar.gz markdown-preview-linux | ||
zip markdown-preview-win.zip markdown-preview-win.exe | ||
|
||
declare -a files=("markdown-preview-win.zip" "markdown-preview-macos.tar.gz" "markdown-preview-linux.tar.gz") | ||
|
||
# Validate token. | ||
curl -o /dev/null -sH "$AUTH" $GH_REPO || { echo "Error: Invalid repo, token or network issue!"; exit 1; } | ||
|
||
# Read asset tags. | ||
response=$(curl -sH "$AUTH" $GH_TAGS) | ||
|
||
# Get ID of the asset based on given filename. | ||
eval $(echo "$response" | grep -m 1 "id.:" | grep -w id | tr : = | tr -cd '[[:alnum:]]=') | ||
[ "$id" ] || { echo "Error: Failed to get release id for tag: $tag"; echo "$response" | awk 'length($0)<100' >&2; exit 1; } | ||
|
||
# Upload asset | ||
for filename in "${files[@]}" | ||
do | ||
GH_ASSET="https://uploads.github.com/repos/iamcco/markdown-preview.nvim/releases/$id/assets?name=$filename" | ||
echo "Uploading $filename" | ||
curl -X POST -H "Authorization: token $GITHUB_API_TOKEN" \ | ||
-H "Content-Type: application/octet-stream" \ | ||
--data-binary @"$filename" \ | ||
$GH_ASSET | ||
done |