Skip to content

Commit 107aa72

Browse files
author
Joshua Leaverton
committed
Patching bin folders
1 parent 7c8e302 commit 107aa72

File tree

3 files changed

+57
-1
lines changed

3 files changed

+57
-1
lines changed

deployment/build-open-source-dist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ find $dist_dir -iname "node_modules" -type d -exec rm -rf "{}" \; 2> /dev/null
8686
echo "find $dist_dir -iname "package-lock.json" -type f -exec rm -f "{}" \; 2> /dev/null"
8787
find $dist_dir -iname "package-lock.json" -type f -exec rm -f "{}" \; 2> /dev/null
8888
# Remove python related libraries from open source packaging
89-
files=("idna*" "pytz*" "urllib*" "certifi*" "chardet*" "requests*" "bin" "__pycache__" ".pytest_cache" "cdk.out")
89+
files=("idna*" "pytz*" "urllib*" "certifi*" "chardet*" "requests*" "__pycache__" ".pytest_cache" "cdk.out")
9090
for x in "${files[@]}";
9191
do
9292
echo "Removing files: $x"
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env node
2+
/*****************************************************************************
3+
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. *
4+
* *
5+
* Licensed under the Apache License, Version 2.0 (the "License"). You may *
6+
* not use this file except in compliance with the License. A copy of the *
7+
* License is located at *
8+
* *
9+
* http://www.apache.org/licenses/LICENSE-2.0 *
10+
* *
11+
* or in the 'license' file accompanying this file. This file is distributed *
12+
* on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, *
13+
* express or implied. See the License for the specific language governing *
14+
* permissions and limitations under the License. *
15+
*****************************************************************************/
16+
17+
import * as cdk from '@aws-cdk/core';
18+
import { AwsInstanceSchedulerStack } from '../lib/aws-instance-scheduler-stack';
19+
import { AwsInstanceSchedulerRemoteStack } from '../lib/aws-instance-scheduler-remote-stack';
20+
21+
const SOLUTION_VERSION = process.env['DIST_VERSION'] || '%%VERSION%%';
22+
const SOLUTION_NAME = process.env['SOLUTION_NAME'];
23+
const SOLUTION_ID = process.env['SOLUTION_ID'];
24+
const SOLUTION_BUCKET = process.env['DIST_OUTPUT_BUCKET'];
25+
const SOLUTION_TMN = process.env['SOLUTION_TRADEMARKEDNAME'];
26+
const SOLUTION_PROVIDER = 'AWS Solution Development';
27+
28+
const app = new cdk.App();
29+
30+
31+
new AwsInstanceSchedulerStack(app, 'instance-scheduler', {
32+
description: '(' + SOLUTION_ID + ') - ' + SOLUTION_NAME + ', version ' + SOLUTION_VERSION,
33+
solutionId: SOLUTION_ID,
34+
solutionTradeMarkName: SOLUTION_TMN,
35+
solutionProvider: SOLUTION_PROVIDER,
36+
solutionBucket: SOLUTION_BUCKET,
37+
solutionName: SOLUTION_NAME,
38+
solutionVersion: SOLUTION_VERSION
39+
});
40+
new AwsInstanceSchedulerRemoteStack(app, 'instance-scheduler-remote', {
41+
description: '(' + SOLUTION_ID + ') - ' + SOLUTION_NAME + ' cross account role, version ' + SOLUTION_VERSION,
42+
solutionId: SOLUTION_ID,
43+
solutionTradeMarkName: SOLUTION_TMN,
44+
solutionProvider: SOLUTION_PROVIDER,
45+
solutionBucket: SOLUTION_BUCKET,
46+
solutionName: SOLUTION_NAME,
47+
solutionVersion: SOLUTION_VERSION
48+
});

source/lambda/bin/chardetect

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/root/.pyenv/versions/3.8.1/bin/python3.8
2+
# -*- coding: utf-8 -*-
3+
import re
4+
import sys
5+
from chardet.cli.chardetect import main
6+
if __name__ == '__main__':
7+
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
8+
sys.exit(main())

0 commit comments

Comments
 (0)