把 beta 改成内部版本

Change-Id: I9eedc732dceffe147911058e6b02afbd5d8e4566
This commit is contained in:
2betop 2020-10-26 20:05:39 +08:00
parent d594d4ccdd
commit b4c3f76fa7
6 changed files with 44 additions and 23 deletions

View File

@ -14,7 +14,7 @@ fis-conf.js
/__tests__
/__mocks__
/coverage
/publish.sh
/build.sh
/gh-pages
/.github
/docs

View File

@ -1,4 +1,4 @@
language: node_js
node_js:
- 10
script: sh deploy-gh-pages.sh && sh deploy-npm-beta.sh
script: sh deploy-gh-pages.sh

26
build.sh Normal file
View File

@ -0,0 +1,26 @@
#!/bin/bash
set -e
rm -rf lib
rm -rf output
fis3 release publish -c
rm -rf lib/node_modules
# 生成 sdk
rm -rf sdk && fis3 release publish-sdk -c
# 生成 .d.ts 文件
./node_modules/.bin/tsc --allowJs --declaration
cd output
for f in $(find . -name "*.d.ts"); do
mkdir -p ../lib/$(dirname $f) && mv $f ../lib/$(dirname $f)
done
cd ..
rm -rf output
npm run build-schemas

View File

@ -7,7 +7,7 @@ echo "Cloning"
git clone -b npm --depth=1 https://$GH_TOKEN@github.com/baidu/amis.git npm
echo "building"
sh publish.sh
sh build.sh
cp -rf lib npm
cp package.json npm

View File

@ -1,6 +1,6 @@
{
"name": "amis",
"version": "1.0.17",
"version": "1.0.18-beta.9",
"description": "一种MIS页面生成工具",
"main": "lib/index.js",
"scripts": {
@ -9,8 +9,8 @@
"start": "fis3 server start --www ./public --port 8888 --no-daemon --no-browse",
"stop": "fis3 server stop",
"dev": "fis3 release -cwd ./public",
"publish2npm": "sh publish.sh && npm publish",
"build": "sh publish.sh",
"publish-to-internal": "sh build.sh && sh publish.sh",
"build": "sh build.sh",
"prettier": "prettier --write '{src,examples,scss}/**/*.{tsx,ts,jsx,scss}'",
"deploy-gh-page": "sh ./deploy-gh-pages.sh",
"build-schemas": "ts-node -O '{\"target\":\"es6\"}' scripts/build-schemas.ts"

View File

@ -1,26 +1,21 @@
#!/bin/bash
set -e
rm -rf lib
rm -rf output
rm -rf npm
mkdir npm
fis3 release publish -c
rm -rf lib/node_modules
cp -rf lib npm
cp package.json npm
cp schema.json npm
cp -rf scss npm
cp -rf examples npm
cp -rf sdk npm
# 生成 sdk
rm -rf sdk && fis3 release publish-sdk -c
cd npm
# 生成 .d.ts 文件
./node_modules/.bin/tsc --allowJs --declaration
sed -i '' -e 's/\"name\": \"amis\"/\"name\": \"@fex\/amis\"/g' ./package.json
cd output
for f in $(find . -name "*.d.ts"); do
mkdir -p ../lib/$(dirname $f) && mv $f ../lib/$(dirname $f)
done
npm publish --registry=http://registry.npm.baidu-int.com
cd ..
rm -rf output
npm run build-schemas
rm -rf npm