Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta bundle #7

Merged
merged 14 commits into from
Jun 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 2 additions & 67 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,5 @@
.DS_Store
node_modules
lerna-debug.log
*.js


# Created by https://www.gitignore.io/api/node

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


# End of https://www.gitignore.io/api/node
dist
pack
9 changes: 8 additions & 1 deletion buildspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@ phases:
build:
commands:
- /bin/bash ./build.sh

post_build:
commands:
- /bin/bash ./pack.sh
- /bin/bash ./bundle-beta.sh
artifacts:
files:
- "**/*"
base-directory: dist
50 changes: 50 additions & 0 deletions bundle-beta.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

#!/bin/bash
# Creates our beta bundle for the CDK.
# Assume we have a bootstrapped and packaged repository
set -euo pipefail
root=$PWD

staging="$(mktemp -d)"
cd ${staging}

echo "Staging: ${staging}"

# Bundle structure
# ================
#
# + bin
# + docs
# + repo
# + npm
# + maven
# + node_modules
#

# Create a local npm repository
mkdir -p repo/npm
rsync -aL ${root}/pack/*.tgz repo/npm # cdk modules
rsync -aL ${root}/local-npm/*.tgz repo/npm # jsii modules

# Create a local maven repository
mkdir -p repo/maven
cp ${root}/packages/aws-cdk-java/target/*.jar repo/maven

# Deploy the docs website to docs/
rsync -a ${root}/packages/aws-cdk-docs/dist/docs/ ./docs

# Bootstrap a production-ready node_modules closure with all npm modules (jsii and CDK)
npm install --global-style --production --no-save repo/npm/*.tgz

# Symlink 'bin' to the root
ln -s node_modules/.bin bin

# Create an archive under ./dist
version="$(cat ${root}/lerna.json | grep version | cut -d '"' -f4)"
dist=${root}/dist
output=${dist}/aws-cdk-${version}.zip
rm -fr ${dist}
mkdir -p ${dist}
zip -r ${output} .
echo ${output}

1 change: 1 addition & 0 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "examples",
"version": "0.6.0",
"description": "A bunch of CDK examples",
"private": true,
"scripts": {
"prepare": "tsc && tslint -p . && pkglint",
"watch": "tsc -w",
Expand Down
10 changes: 10 additions & 0 deletions pack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -e
export PATH=$PWD/node_modules/.bin:$PATH

packdir="$PWD/pack"
rm -fr ${packdir}
mkdir -p ${packdir}

lerna ls | grep -v "private" | cut -d" " -f1 | xargs -n1 -I{} \
lerna exec --scope {} --stream -- "npm pack && mv *.tgz ${packdir}"
3 changes: 3 additions & 0 deletions packages/aws-cdk-acm/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-all/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-applet-js/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-assert/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-cloudformation-diff/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-cloudtrail/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-codebuild/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-codecommit/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-codepipeline/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-custom-resources/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-cx-api/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
/*
!/dist/docs
/dist/staging
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "docs",
"private": true,
"name": "aws-cdk-docs",
"version": "0.6.0",
"description": "AWS CDK Documentation",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"private": true,
"repository": {
"type": "git",
"url": "git://github.com/awslabs/aws-cdk"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions packages/aws-cdk-dynamodb/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-ec2/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-events/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-iam/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
6 changes: 6 additions & 0 deletions packages/aws-cdk-java/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
/*
!/target
/target/*
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-java/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ for p in $(find-jsii-packages -k jsii.names.java); do
echo "Generating java code for module $p"
jsii-pacmak --target java --outdir "${outdir}" $p
done

mkdir -p target
cp -f ../../node_modules/jsii-java-runtime/jsii-runtime-0.4.0.jar $PWD/target
2 changes: 1 addition & 1 deletion packages/aws-cdk-java/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "aws-cdk-java",
"private": true,
"version": "0.6.0",
"description": "The AWS CDK for Java",
"private": true,
"repository": {
"type": "git",
"url": "git://github.com/awslabs/aws-cdk"
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<artifactId>jsii-runtime</artifactId>
<version>0.4.0</version>
<scope>system</scope>
<systemPath>${basedir}/../../node_modules/jsii-java-runtime/jsii-runtime-0.4.0.jar</systemPath>
<systemPath>${basedir}/target/jsii-runtime-0.4.0.jar</systemPath>
</dependency>

<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-kms/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-lambda/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-neptune/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-quickstarts/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-rds/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-resources/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
2 changes: 1 addition & 1 deletion packages/aws-cdk-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Raw CloudFormation resources for CDK",
"version": "0.6.0",
"scripts": {
"prepare": "cfn2ts ../../cloudformation-specs/*.json && jsii && tslint -p . && pkglint",
"prepare": "cfn2ts ./cloudformation-specs/*.json && jsii && tslint -p . && pkglint",
"test": "nodeunit test/test.*.js",
"lint": "tsc && jsii && tslint -p . --force",
"watch": "jsii -w",
Expand Down
3 changes: 3 additions & 0 deletions packages/aws-cdk-route53/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
2 changes: 2 additions & 0 deletions packages/aws-cdk-rtv/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ tsconfig.json
*.d.ts
dist
lib/generated/resources.ts
.nyc_output
coverage
3 changes: 3 additions & 0 deletions packages/aws-cdk-rtv/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
3 changes: 3 additions & 0 deletions packages/aws-cdk-s3/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Don't include original .ts files when doing `npm pack`
*.ts
!*.d.ts
coverage
.nyc_output
*.tgz
Loading