@aws-cdk/aws-glue-alpha 2.262.2-alpha.0 → 2.263.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,44 @@
1
+ #!/bin/bash
2
+
3
+ # This is a pre-build script that is run prior to building the aws-glue-alpha module.
4
+ # aws-glue-alpha has a dev dependency on custom-resource-handlers which triggers that
5
+ # module to build first. Once complete, this script will run to move all generated custom
6
+ # resource code into a custom-resource-handlers directory directly in aws-glue-alpha.
7
+
8
+ scriptdir=$(cd $(dirname $0) && pwd)
9
+ customresourcedir=$(node -p "path.dirname(require.resolve('@aws-cdk/custom-resource-handlers/package.json'))")
10
+ awscdklibdir=${scriptdir}/..
11
+
12
+ # copy code generated custom resource files into aws-glue-alpha/custom-resource-handlers
13
+ # from custom-resource-handlers/dist/aws-glue-alpha
14
+ function airlift() {
15
+ mkdir -p $awscdklibdir/custom-resource-handlers/$1
16
+ cp $customresourcedir/$2 $awscdklibdir/custom-resource-handlers/$1
17
+ }
18
+
19
+ # recursively iterates over directories and files in custom-resource-handlers/dist/aws-glue-alpha
20
+ # and copies them into aws-glue-alpha/custom-resource-handlers
21
+ function recurse() {
22
+ local dir=$1
23
+
24
+ for file in $dir/*; do
25
+ if [ -f $file ]; then
26
+ case $file in
27
+ $customresourcedir/dist/aws-glue-alpha/*.generated.ts)
28
+ cr=$(echo $file | rev | cut -d "/" -f 2-3 | rev)
29
+ airlift $cr $cr/*.generated.ts
30
+ ;;
31
+ $customresourcedir/dist/aws-glue-alpha/*/index.*)
32
+ cr=$(echo $file | rev | cut -d "/" -f 2-4 | rev)
33
+ airlift $cr $cr/index.*
34
+ ;;
35
+ esac
36
+ fi
37
+
38
+ if [ -d $file ]; then
39
+ recurse $file
40
+ fi
41
+ done
42
+ }
43
+
44
+ recurse $customresourcedir/dist/aws-glue-alpha