forked from swagger-api/swagger-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
63 additions
and
12 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 |
---|---|---|
|
@@ -7,21 +7,28 @@ branches: | |
only: | ||
- master | ||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/ | ||
before_deploy: "npm run build-core" | ||
before_deploy: | ||
- npm run build | ||
env: | ||
- DOCKER_IMAGE_NAME=swaggerapi/swagger-ui | ||
deploy: | ||
provider: npm | ||
email: [email protected] | ||
skip_cleanup: true | ||
api_key: | ||
secure: "IJkLaACa+rfERf1O5nwlqOyuo9sbul3FBhBt4Un9P+DvEet3AoDPV9NQVLd8SkmQYKGbGQWF4BIdjrO5nqFD6Te+JTeUX5Uo/DFS/fu9qw1xv0dQpvbJFuoYnnFlbzGTEs4CFa8lbu3ZromFHQGOQxRobjsG1Kf0dWFSSzmND3g=" | ||
on: | ||
tags: true | ||
repo: swagger-api/swagger-ui | ||
node: '6.9' | ||
- provider: npm | ||
email: [email protected] | ||
skip_cleanup: true | ||
api_key: | ||
secure: "IJkLaACa+rfERf1O5nwlqOyuo9sbul3FBhBt4Un9P+DvEet3AoDPV9NQVLd8SkmQYKGbGQWF4BIdjrO5nqFD6Te+JTeUX5Uo/DFS/fu9qw1xv0dQpvbJFuoYnnFlbzGTEs4CFa8lbu3ZromFHQGOQxRobjsG1Kf0dWFSSzmND3g=" | ||
on: | ||
tags: true | ||
repo: swagger-api/swagger-ui | ||
node: '6.9' | ||
- provider: script | ||
script: swagger-ui-dist-package/deploy.sh | ||
on: | ||
tags: true | ||
repo: swagger-api/swagger-ui | ||
node: '6.9' | ||
after_success: | ||
- if [ $DOCKER_HUB_USERNAME ]; then | ||
- if [ $DOCKER_HUB_USERNAME ]; then | ||
docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD; | ||
|
||
if [ ! -z "$TRAVIS_TAG" ]; then | ||
|
@@ -40,4 +47,3 @@ after_success: | |
docker push $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG; | ||
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,2 @@ | ||
README.md | ||
deploy.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//registry.npmjs.org/:_authToken=${NPM_TOKEN} |
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,3 @@ | ||
This directory is used to build the `swagger-ui-dist` npm package. | ||
|
||
For anything else, check the [Swagger-UI](https://github.com/swagger-api/swagger-ui) repository. |
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,21 @@ | ||
# Deploy `swagger-ui-dist` to npm. | ||
|
||
# Parameter Expansion: http://stackoverflow.com/questions/6393551/what-is-the-meaning-of-0-in-a-bash-script | ||
cd "${0%/*}" | ||
|
||
# Get UI version | ||
UI_VERSION=$(node -p "require('../package.json').version") | ||
|
||
# Replace our version placeholder with UI's version | ||
sed -i '' "s|\$\$VERSION|$UI_VERSION|g" package.json | ||
|
||
# Copy UI's dist files to our directory | ||
cp ../dist/* . | ||
|
||
if [[ $PUBLISH_DIST = "true" || $TRAVIS = "true" ]]; then | ||
npm publish . | ||
else | ||
npm pack . | ||
fi | ||
|
||
rm !(README.md|package.json|deploy.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "swagger-ui-dist", | ||
"version": "$$VERSION", | ||
"main": "dist/swagger-ui.js", | ||
"repository": "[email protected]:swagger-api/swagger-ui.git", | ||
"contributors": [ | ||
"(in alphabetical order)", | ||
"Anna Bodnia <[email protected]>", | ||
"Buu Nguyen <[email protected]>", | ||
"Josh Ponelat <[email protected]>", | ||
"Kyle Shockey <[email protected]>", | ||
"Robert Barnwell <[email protected]>", | ||
"Sahar Jafari <[email protected]>" | ||
], | ||
"license": "Apache-2.0", | ||
"dependencies": {}, | ||
"devDependencies": {} | ||
} |