Compare commits

...

27 Commits

Author SHA1 Message Date
Dominik Prokop
962089bc2b test 2019-07-12 15:08:35 +02:00
Dominik Prokop
ae61bb923f Minor copy 2019-07-12 13:43:58 +02:00
Dominik Prokop
d69b54d41a Run next packages release on master but not when tagged with release 2019-07-12 13:41:43 +02:00
Dominik Prokop
ceaa30d88e Rename job and run it after frontend tests and build passes 2019-07-12 13:19:29 +02:00
Dominik Prokop
5e4971ac01 Set git creds before commit 2019-07-12 13:04:00 +02:00
Dominik Prokop
266d8cab89 Publish to npm 2019-07-12 12:53:37 +02:00
Dominik Prokop
1bf2ad37f3 Merge branch 'vvmaster' into packages/circle 2019-07-12 12:45:17 +02:00
Dominik Prokop
e9dd84f9d3 Remove postpublish 2019-07-11 16:05:49 +02:00
Dominik Prokop
660b9a3126 Packages version bump 2019-07-11 15:58:59 +02:00
Dominik Prokop
b924884240 Correct lerna version 2019-07-11 15:50:02 +02:00
Dominik Prokop
605de54852 Reset git befgore publishing package 2019-07-11 15:40:02 +02:00
Dominik Prokop
9b674b3944 update lerna publish script 2019-07-11 15:33:46 +02:00
Dominik Prokop
d249335a6c Add publishing packages 2019-07-11 15:27:13 +02:00
Dominik Prokop
bcabffc25b Typo fix 2019-07-11 14:42:28 +02:00
Dominik Prokop
e58e7cb4c5 Try any... 2019-07-11 14:41:05 +02:00
Dominik Prokop
74c118f1d1 Remove @types/lodas resolution 2019-07-11 14:34:16 +02:00
Dominik Prokop
ac9774e7bb lerna add data package to ui 2019-07-11 14:18:07 +02:00
Dominik Prokop
31d619c7de temporarily add tsignore 2019-07-11 14:08:42 +02:00
Dominik Prokop
ecac5d6931 add lerna bootstrap 2019-07-11 13:52:03 +02:00
Dominik Prokop
6e2c5eb52a Remove cache tmp 2019-07-11 13:44:50 +02:00
Dominik Prokop
a28c96090c Install packages before release 2019-07-11 13:31:27 +02:00
Dominik Prokop
1292d203a8 Add packages:build 2019-07-11 13:26:59 +02:00
Dominik Prokop
2ed7ceb59d Use packages cache, run lern via npx 2019-07-11 13:23:17 +02:00
Dominik Prokop
98908f7b98 Run lerna from local bin 2019-07-11 13:16:07 +02:00
Dominik Prokop
c8da0ac1c8 yarn fix 2019-07-11 13:10:14 +02:00
Dominik Prokop
add6a0d00a Remove dependency on test task, fix yarn 2019-07-11 13:08:33 +02:00
Dominik Prokop
c74c7e24e2 Testing lerna on circle 2019-07-11 13:00:58 +02:00
9 changed files with 78 additions and 24 deletions

View File

@@ -7,12 +7,17 @@ aliases:
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
- &filter-not-release-or-master - &filter-not-release-or-master
tags: tags:
ignore: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ ignore: /^v[0--9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
branches: branches:
ignore: master ignore: master
- &filter-only-master - &filter-only-master
branches: branches:
only: master only: master
- &filter-only-master-but-not-release
tags:
ignore: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
branches:
only: master
version: 2 version: 2
@@ -623,6 +628,21 @@ jobs:
echo "-- no changes to docs files --" echo "-- no changes to docs files --"
fi fi
release-next-packages:
docker:
- image: circleci/node:10
steps:
- checkout
- run:
name: Boostrap lerna
command: 'npx lerna bootstrap'
- run:
name: npm - Prepare auth token
command: 'echo //registry.npmjs.org/:_authToken=$NPM_TOKEN >> ~/.npmrc'
- run:
name: Release next packages
command: './scripts/circle-release-next-packages.sh'
workflows: workflows:
version: 2 version: 2
build-master: build-master:
@@ -694,6 +714,11 @@ workflows:
requires: requires:
- end-to-end-test - end-to-end-test
filters: *filter-only-master filters: *filter-only-master
- release-next-packages:
requires:
- test-frontend
- build-fast-frontend
filters: *filter-only-master-but-not-release
release: release:
jobs: jobs:
- build-all: - build-all:
@@ -803,3 +828,4 @@ workflows:
- postgres-integration-test - postgres-integration-test
- cache-server-test - cache-server-test
filters: *filter-not-release-or-master filters: *filter-not-release-or-master

View File

@@ -148,7 +148,8 @@
"themes:generate": "ts-node --project ./scripts/cli/tsconfig.json ./scripts/cli/generateSassVariableFiles.ts", "themes:generate": "ts-node --project ./scripts/cli/tsconfig.json ./scripts/cli/generateSassVariableFiles.ts",
"packages:prepare": "lerna run clean && npm run test && lerna version --tag-version-prefix=\"packages@\" -m \"Packages: publish %s\" --no-push", "packages:prepare": "lerna run clean && npm run test && lerna version --tag-version-prefix=\"packages@\" -m \"Packages: publish %s\" --no-push",
"packages:build": "lerna run clean && lerna run build", "packages:build": "lerna run clean && lerna run build",
"packages:publish": "lerna publish from-package --contents dist --dist-tag next --tag-version-prefix=\"packages@\"" "packages:publish": "lerna publish from-package --contents dist",
"packages:publishNext": "lerna publish from-package --contents dist --dist-tag next --yes"
}, },
"husky": { "husky": {
"hooks": { "hooks": {

View File

@@ -11,8 +11,7 @@
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"clean": "rimraf ./dist ./compiled", "clean": "rimraf ./dist ./compiled",
"bundle": "rollup -c rollup.config.ts", "bundle": "rollup -c rollup.config.ts",
"build": "grafana-toolkit package:build --scope=data", "build": "grafana-toolkit package:build --scope=data"
"postpublish": "npm run clean"
}, },
"author": "Grafana Labs", "author": "Grafana Labs",
"license": "Apache-2.0", "license": "Apache-2.0",
@@ -37,8 +36,5 @@
"rollup-plugin-visualizer": "0.9.2", "rollup-plugin-visualizer": "0.9.2",
"sinon": "1.17.6", "sinon": "1.17.6",
"typescript": "3.4.1" "typescript": "3.4.1"
},
"resolutions": {
"@types/lodash": "4.14.119"
} }
} }

View File

@@ -11,8 +11,7 @@
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"clean": "rimraf ./dist ./compiled", "clean": "rimraf ./dist ./compiled",
"bundle": "rollup -c rollup.config.ts", "bundle": "rollup -c rollup.config.ts",
"build": "grafana-toolkit package:build --scope=runtime", "build": "grafana-toolkit package:build --scope=runtime"
"postpublish": "npm run clean"
}, },
"author": "Grafana Labs", "author": "Grafana Labs",
"license": "Apache-2.0", "license": "Apache-2.0",
@@ -33,8 +32,5 @@
"rollup-plugin-typescript2": "0.19.3", "rollup-plugin-typescript2": "0.19.3",
"rollup-plugin-visualizer": "0.9.2", "rollup-plugin-visualizer": "0.9.2",
"typescript": "3.4.1" "typescript": "3.4.1"
},
"resolutions": {
"@types/lodash": "4.14.119"
} }
} }

View File

@@ -15,8 +15,7 @@
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"precommit": "npm run tslint & npm run typecheck", "precommit": "npm run tslint & npm run typecheck",
"clean": "rimraf ./dist ./compiled", "clean": "rimraf ./dist ./compiled",
"build": "grafana-toolkit toolkit:build", "build": "grafana-toolkit toolkit:build"
"postpublish": "npm run clean"
}, },
"author": "Grafana Labs", "author": "Grafana Labs",
"license": "Apache-2.0", "license": "Apache-2.0",
@@ -75,9 +74,6 @@
"url-loader": "^2.0.1", "url-loader": "^2.0.1",
"webpack": "4.35.0" "webpack": "4.35.0"
}, },
"resolutions": {
"@types/lodash": "4.14.119"
},
"devDependencies": { "devDependencies": {
"@types/glob": "^7.1.1", "@types/glob": "^7.1.1",
"@types/prettier": "^1.16.4" "@types/prettier": "^1.16.4"

View File

@@ -99,4 +99,4 @@ const buildTaskRunner: TaskRunner<PackageBuildOptions> = async ({ scope }) => {
await Promise.all(scopes.map(s => s())); await Promise.all(scopes.map(s => s()));
}; };
export const buildPackageTask = new Task<PackageBuildOptions>('@grafana/ui build', buildTaskRunner); export const buildPackageTask = new Task<PackageBuildOptions>('Package build', buildTaskRunner);

View File

@@ -15,12 +15,12 @@
"storybook:build": "build-storybook -o ./dist/storybook -c .storybook", "storybook:build": "build-storybook -o ./dist/storybook -c .storybook",
"clean": "rimraf ./dist ./compiled", "clean": "rimraf ./dist ./compiled",
"bundle": "rollup -c rollup.config.ts", "bundle": "rollup -c rollup.config.ts",
"build": "grafana-toolkit package:build --scope=ui", "build": "grafana-toolkit package:build --scope=ui"
"postpublish": "npm run clean"
}, },
"author": "Grafana Labs", "author": "Grafana Labs",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@grafana/data": "^6.4.0-alpha.8",
"@torkelo/react-select": "2.1.1", "@torkelo/react-select": "2.1.1",
"@types/react-color": "2.17.0", "@types/react-color": "2.17.0",
"classnames": "2.2.6", "classnames": "2.2.6",
@@ -77,8 +77,5 @@
"rollup-plugin-typescript2": "0.19.3", "rollup-plugin-typescript2": "0.19.3",
"rollup-plugin-visualizer": "0.9.2", "rollup-plugin-visualizer": "0.9.2",
"typescript": "3.4.1" "typescript": "3.4.1"
},
"resolutions": {
"@types/lodash": "4.14.119"
} }
} }

View File

@@ -29,7 +29,7 @@ export class TableInputCSV extends React.PureComponent<Props, State> {
}; };
} }
readCSV = debounce(() => { readCSV: any = debounce(() => {
const { config } = this.props; const { config } = this.props;
const { text } = this.state; const { text } = this.state;

View File

@@ -0,0 +1,42 @@
#!/bin/bash
function parse_git_hash() {
git rev-parse --short HEAD 2> /dev/null | sed "s/\(.*\)/\1/"
}
function prapare_version_commit () {
echo $'\nCommiting version changes. This commit will not be checked-in!'
git config --global user.email "circleci@grafana.com"
git config --global user.name "CirceCI"
git commit -am "Version commit"
}
#Get current version from lerna.json
PACKAGE_VERSION=`grep '"version"' lerna.json | cut -d '"' -f 4`
# Get short current commit's has
GIT_SHA=$(parse_git_hash)
echo "Commit: ${GIT_SHA}"
echo "Current lerna.json version: ${PACKAGE_VERSION}"
# count packages that changed
count=`npx lerna changed --loglevel silent | awk '{c++} END {print c}'`
if [ -z $count ]; then
echo "No changes in packages, skipping packages publishing"
else
echo "Changes detected in ${count} packages"
echo "Releasing packages under ${PACKAGE_VERSION}-${GIT_SHA}"
npx lerna version ${PACKAGE_VERSION}-${GIT_SHA} --no-git-tag-version --no-push --force-publish -y
echo $'\nGit status:'
git status -s
echo $'\nBuilding packages'
yarn packages:build
prapare_version_commit
echo $'\nPublishing packages'
yarn packages:publishNext
fi