Skip to content

Commit ce448a6

Browse files
committed
Release 0.0.80
1 parent d3ab5e2 commit ce448a6

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

dist/main.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3+
* This devtool is not neither made for production nor for readable output files.
4+
* It uses "eval()" calls to create a separate source file in the browser devtools.
5+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6+
* or disable the default devtool with "devtool: false".
7+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8+
*/
9+
/******/ (() => { // webpackBootstrap
10+
/******/ "use strict";
11+
/******/ })()
12+
;

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "coc.nvim",
3-
"version": "0.0.79",
3+
"version": "0.0.80",
44
"description": "LSP based intellisense engine for neovim & vim8.",
55
"main": "./lib/index.js",
66
"engines": {
@@ -47,3 +47,4 @@
4747
"devDependencies": {},
4848
"dependencies": {}
4949
}
50+

release.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/sh
2+
3+
set -e
4+
set -x
5+
6+
git add package.json history.md
7+
tag=v$(json -f package.json version)
8+
git commit -a -m "Release $tag" &> /dev/null
9+
rm -rf build
10+
webpack
11+
mkdir .release
12+
cp -r build autoload package.json plugin data Readme.md doc history.md .release
13+
git checkout release
14+
cp -r .release/* .
15+
git add .
16+
git commit -a -m "Release $tag"
17+
git tag -a "$tag" -m "Release $tag"
18+
git push
19+
git push --tags
20+
## upload assets
21+
cd ./build
22+
tar -zcf coc.tar.gz index.js
23+
zip coc.zip index.js
24+
declare -a files=("coc.zip" "coc.tar.gz")
25+
GH_API="https://api.github.com"
26+
GH_REPO="$GH_API/repos/neoclide/coc.nvim"
27+
GH_TAGS="$GH_REPO/releases/tags/$tag"
28+
AUTH="Authorization: token $GITHUB_API_TOKEN"
29+
# Validate token.
30+
curl -o /dev/null -sH "$AUTH" $GH_REPO || { echo "Error: Invalid repo, token or network issue!"; exit 1; }
31+
# Create release
32+
echo "Creating release for $tag"
33+
curl -X POST -H "Authorization: token $GITHUB_API_TOKEN" \
34+
-H "Content-Type: application/json" \
35+
--data "{\"tag_name\":\"$tag\"}" \
36+
"$GH_REPO/releases"
37+
# Read asset tags.
38+
response=$(curl -sH "$AUTH" $GH_TAGS)
39+
# Get ID of the asset based on given filename.
40+
eval $(echo "$response" | grep -m 1 "id.:" | grep -w id | tr : = | tr -cd '[[:alnum:]]=')
41+
[ "$id" ] || { echo "Error: Failed to get release id for tag: $tag"; echo "$response" | awk 'length($0)<100' >&2; exit 1; }
42+
# Upload asset
43+
for filename in "${files[@]}"
44+
do
45+
GH_ASSET="https://uploads.github.com/repos/neoclide/coc.nvim/releases/$id/assets?name=$filename"
46+
echo "Uploading $filename"
47+
curl -X POST -H "Authorization: token $GITHUB_API_TOKEN" \
48+
-H "Content-Type: application/octet-stream" \
49+
--data-binary @"$filename" \
50+
$GH_ASSET
51+
done
52+
rm coc.zip coc.tar.gz
53+
cd ..
54+
git checkout master
55+
rm -rf .release
56+
nvim -c 'helptags doc|q'

0 commit comments

Comments
 (0)