Skip to content

Commit

Permalink
Merge 6fe4d0e into 0b12dd6
Browse files Browse the repository at this point in the history
  • Loading branch information
redallen committed Feb 21, 2019
2 parents 0b12dd6 + 6fe4d0e commit 2dc9c6d
Show file tree
Hide file tree
Showing 5 changed files with 380 additions and 3,533 deletions.
6 changes: 0 additions & 6 deletions .circleci/clean_cache.sh

This file was deleted.

31 changes: 18 additions & 13 deletions .circleci/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@
# Note: do not do set -x or the passwords will leak!
set -e

echo "Doing a release..."
git config credential.helper store
echo "https://${GH_USERNAME}:${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git" > ~/.git-credentials
echo "Preparing release environment..."
git config --global user.email "patternfly-build@redhat.com"
git config --global user.name "patternfly-build"

npm config set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" -q
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
npm prune

git config --global user.email "patternfly-build@redhat.com"
git config --global user.name "patternfly-build"
git config --global push.default simple
git checkout master
echo "Doing a release..."
# Lerna is complicated. Commands: https://github.com/lerna/lerna/tree/master/commands
git checkout $TRAVIS_BRANCH # Lerna needs to be on a real HEAD
git rev-parse HEAD # helpful for debugging any lerna EUNCOMMIT errors

# Tag this new commit with each package change. Don't push it yet.
npx lerna version --conventional-commits --no-commit-hooks --no-git-tag-version --no-push --yes

# helpful for debugging any lerna EUNCOMMIT errors
git rev-parse HEAD
yarn run lerna changed || true
yarn lerna:publish
# Check each package.json and determe if any package version is not present in the registry.
# Any versions not present in the registry will be published.
if npx lerna publish from-package --no-changelog --no-git-tag-version --no-push --yes ; then
# Undo that last commit locally
git reset --hard HEAD~1
# Now only if it publishes should we also push this commit to Github and do a Github release.
npx lerna version --conventional-commits --github-release --no-commit-hooks --yes
fi
16 changes: 6 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,18 @@ cache:
- packages/patternfly-4/react-styles/dist
- packages/patternfly-4/react-table/dist
- packages/patternfly-4/react-tokens/dist
- packages/patternfly-4/react-docs/public # PF4 docs
- packages/patternfly-4/react-docs/public # To cache PF4 docs
git:
depth: 10
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
except: # Avoid tags
- "/^v\\d+\\.\\d+\\.\\d+$/"
notifications:
email: false

# Tests will come before build without a `stages` block.
stages:
- Build
- Tests
- Test
- name: Deploy
if: branch = master && type != pull_request && fork = false

Expand All @@ -46,9 +45,7 @@ jobs:
script:
- yarn build

# Due to Travis limitations, nothing can be cached here since steps
# run in parallel.
- stage: Tests
- stage: Test # Nothing can be cached in this stage since steps run in parallel.
name: (PF4) Jest Tests
install: skip
script:
Expand All @@ -65,11 +62,10 @@ jobs:
script:
- rm -rf packages/patternfly-4/react-docs/public
- yarn build:prdocs
- .circleci/clean_cache.sh
- name: Lint and Stylelint
install: skip
script:
- yarn lint || true
- yarn lint || true # Disable linting failing build (for now)
- yarn lint:style

- stage: Deploy
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@
"istanbul-reports": "1.3.0",
"jest": "^23.6.0",
"jest-cli": "^23.6.0",
"lerna": "^3.11.0",
"lerna-changelog": "^0.8.2",
"lerna": "^3.13.0",
"local-web-server": "^2.6.1",
"minimist": "^1.2.0",
"mutation-observer": "^1.0.3",
Expand Down Expand Up @@ -115,7 +114,6 @@
"commitmsg": "commitlint -e",
"coveralls": "shx cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"generate": "yarn plop",
"lerna:publish": "lerna publish --github-release --conventional-commits --yes --ci",
"lint": "lerna run lint --parallel",
"lint:fix": "lerna run lint:fix --parallel",
"lint:style": "lerna run stylelint",
Expand Down
Loading

0 comments on commit 2dc9c6d

Please sign in to comment.