This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into beta3-prep
- Loading branch information
Showing
8 changed files
with
123 additions
and
63 deletions.
There are no files selected for viewing
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,17 +1,30 @@ | ||
env: | ||
global: | ||
PUBLISH_NPM_LATEST_FROM="master" | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- '10.0.0' | ||
before_install: | ||
- npm i -g npm@6.4.1 | ||
- yarn global add typescript | ||
- yarn global add webpack | ||
before_script: | ||
- source ./scripts/is_latest.sh | ||
script: | ||
- yarn run lint | ||
- yarn run test | ||
deploy: | ||
- provider: script | ||
skip_cleanup: true | ||
script: | ||
- ./scripts/publish.sh | ||
- ./scripts/publish-edge.sh | ||
on: | ||
branch: develop | ||
branch: develop | ||
- provider: script | ||
skip_cleanup: true | ||
script: | ||
- ./scripts/publish-tag.sh $PUBLISH_NPM_LATEST_FROM | ||
on: | ||
tags: true | ||
condition: $TRAVIS_IS_LATEST_TAG = true # sourced from ./scripts/is_latest.sh |
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,26 @@ | ||
#!/bin/bash | ||
|
||
. "${TRAVIS_BUILD_DIR}/scripts/publish-utils.sh"; | ||
|
||
echo "Running on branch/tag ${TRAVIS_BRANCH}": | ||
|
||
echo "Setting up git" | ||
setup_git | ||
|
||
echo "Creating new version" | ||
git checkout -- . | ||
|
||
git status | ||
|
||
# get the short commit hash to include in the npm package | ||
current_commit="$(git rev-parse --short HEAD)"; | ||
|
||
npm version prerelease -preid "${current_commit}" -no-git-tag-version | ||
|
||
git commit -a -m "Updating version [skip ci]" | ||
|
||
echo "Publish to NPM" | ||
|
||
cp .npmrc.template $HOME/.npmrc | ||
|
||
npm publish --tag edge |
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,37 @@ | ||
#!/bin/bash | ||
|
||
. "${TRAVIS_BUILD_DIR}/scripts/publish-utils.sh"; | ||
|
||
if [[ "$TRAVIS_TAG" == "" ]]; then | ||
echo "No tag specified, skipping..."; | ||
else | ||
echo "Running on branch/tag ${TRAVIS_TAG}": | ||
|
||
echo "Setting up git" | ||
setup_git | ||
|
||
echo "Creating new version" | ||
git checkout -- . | ||
|
||
git status | ||
|
||
npm version -no-git-tag-version $TRAVIS_TAG | ||
|
||
echo "Pushing to git" | ||
git commit -a -m "Publishing version ${TRAVIS_TAG} [skip ci]" | ||
|
||
git push origin HEAD:${1} | ||
|
||
echo "Build and Publish to NPM" | ||
|
||
cp .npmrc.template $HOME/.npmrc | ||
|
||
if [[ "$TRAVIS_TAG" == *"-beta"* ]]; then | ||
echo "Publishing with beta tag to npm" | ||
npm publish --tag beta | ||
else | ||
echo "Publishing with latest tag to npm" | ||
npm publish | ||
fi | ||
fi | ||
|
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,16 @@ | ||
#!/bin/bash | ||
|
||
setup_git() { | ||
# Set the user name and email to match the API token holder | ||
# This will make sure the git commits will have the correct photo | ||
# and the user gets the credit for a checkin | ||
git config --global user.email "devops@block.one" | ||
git config --global user.name "blockone-devops" | ||
git config --global push.default matching | ||
|
||
# Get the credentials from a file | ||
git config credential.helper "store --file=.git/credentials" | ||
|
||
# This associates the API Key with the account | ||
echo "https://${GITHUB_API_KEY}:@github.com" > .git/credentials | ||
} |
This file was deleted.
Oops, something went wrong.
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