Skip to content

Commit 93c027c

Browse files
authored
Merge pull request #246 from aws-amplify/master
Release Amplify Codegen v2.26.6
2 parents fe5d8ff + 87c1176 commit 93c027c

File tree

13 files changed

+423
-348
lines changed

13 files changed

+423
-348
lines changed

.circleci/config.base.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,7 @@ jobs:
118118
- run:
119119
name: Publish Amplify Codegen
120120
command: |
121-
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
122-
git config --global user.email $GITHUB_EMAIL
123-
git config --global user.name $GITHUB_USER
124-
npm run publish:$CIRCLE_BRANCH
125-
else
126-
echo "Skipping deploy."
127-
fi
121+
bash ./.circleci/publish.sh
128122
129123
publish_to_local_registry:
130124
<<: *defaults
@@ -235,7 +229,7 @@ workflows:
235229
only:
236230
- master
237231
- e2e-testing
238-
- dart-modelgen-null-safety
232+
- /tagged-release\/.*/
239233
- e2e-test:
240234
context:
241235
- cleanup-resources
@@ -249,7 +243,7 @@ workflows:
249243
only:
250244
- master
251245
- e2e-testing
252-
- dart-modelgen-null-safety
246+
- /tagged-release\/.*/
253247
- deploy:
254248
os: linux_node12
255249
requires:
@@ -261,7 +255,8 @@ workflows:
261255
only:
262256
- release
263257
- master
264-
- dart-modelgen-null-safety
258+
- /tagged-release\/.*/
259+
- /tagged-release-without-e2e-tests\/.*/
265260
- done_with_node_e2e_tests:
266261
os: linux_node12
267262
requires:

.circleci/config.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,7 @@ jobs:
126126
- run:
127127
name: Publish Amplify Codegen
128128
command: |
129-
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
130-
git config --global user.email $GITHUB_EMAIL
131-
git config --global user.name $GITHUB_USER
132-
npm run publish:$CIRCLE_BRANCH
133-
else
134-
echo "Skipping deploy."
135-
fi
129+
bash ./.circleci/publish.sh
136130
publish_to_local_registry:
137131
working_directory: ~/repo
138132
parameters: *ref_0
@@ -420,7 +414,7 @@ workflows:
420414
only:
421415
- master
422416
- e2e-testing
423-
- dart-modelgen-null-safety
417+
- /tagged-release\/.*/
424418
- deploy:
425419
os: linux_node12
426420
requires:
@@ -432,7 +426,8 @@ workflows:
432426
only:
433427
- release
434428
- master
435-
- dart-modelgen-null-safety
429+
- /tagged-release\/.*/
430+
- /tagged-release-without-e2e-tests\/.*/
436431
- done_with_node_e2e_tests:
437432
os: linux_node12
438433
requires:
@@ -471,7 +466,7 @@ workflows:
471466
only:
472467
- master
473468
- e2e-testing
474-
- dart-modelgen-null-safety
469+
- /tagged-release\/.*/
475470
- add-codegen-android-e2e-test:
476471
context: *ref_8
477472
os: linux_node12

.circleci/publish.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash -e
2+
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
3+
git config --global user.email $GITHUB_EMAIL
4+
git config --global user.name $GITHUB_USER
5+
if [[ "$CIRCLE_BRANCH" =~ ^tagged-release ]]; then
6+
if [[ "$CIRCLE_BRANCH" =~ ^tagged-release-without-e2e-tests\/.* ]]; then
7+
# Remove tagged-release-without-e2e-tests/
8+
export NPM_TAG="${CIRCLE_BRANCH/tagged-release-without-e2e-tests\//}"
9+
elif [[ "$CIRCLE_BRANCH" =~ ^tagged-release\/.* ]]; then
10+
# Remove tagged-release/
11+
export NPM_TAG="${CIRCLE_BRANCH/tagged-release\//}"
12+
fi
13+
if [ -z "$NPM_TAG" ]; then
14+
echo "Tag name is missing. Name your branch with either tagged-release/<tag-name> or tagged-release-without-e2e-tests/<tag-name>"
15+
exit 1
16+
fi
17+
echo "Publishing to NPM with tag $NPM_TAG"
18+
yarn publish:tag
19+
else
20+
yarn publish:$CIRCLE_BRANCH
21+
fi
22+
else
23+
echo "Skipping deploy."
24+
fi

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"production-build": "yarn && lerna run build --concurrency 3 --stream",
1414
"publish:master": "lerna publish --canary --exact --force-publish --preid=dev --dist-tag=dev --include-merged-tags --conventional-prerelease --yes",
1515
"publish:release": "lerna publish --exact --conventional-commits --message 'chore(release): Publish [ci skip]' --yes",
16-
"publish:dart-modelgen-null-safety": "lerna publish --canary --exact --force-publish --preid=flutter-preview --dist-tag=flutter-preview --include-merged-tags --conventional-prerelease --yes",
16+
"publish:tag": "lerna publish --exact --dist-tag=$NPM_TAG --preid=$NPM_TAG --conventional-commits --conventional-prerelease --message 'chore(release): Publish tagged release $NPM_TAG [ci skip]' --no-verify-access --yes",
1717
"postpublish:release": "git fetch . release:master && git push origin master",
1818
"yarn-use-bash": "yarn config set script-shell /bin/bash",
1919
"verdaccio-start": "yarn yarn-use-bash && source .circleci/local_publish_helpers.sh && startLocalRegistry \"$(pwd)/.circleci/verdaccio.yaml\"",

packages/amplify-codegen-e2e-core/src/configure/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,24 @@ const defaultSettings = {
1313
userName: '\r',
1414
};
1515

16-
const regionOptions = [
16+
export const amplifyRegions = [
1717
'us-east-1',
1818
'us-east-2',
19+
'us-west-1',
1920
'us-west-2',
21+
'eu-north-1',
2022
'eu-west-1',
2123
'eu-west-2',
24+
'eu-west-3',
2225
'eu-central-1',
2326
'ap-northeast-1',
2427
'ap-northeast-2',
2528
'ap-southeast-1',
2629
'ap-southeast-2',
2730
'ap-south-1',
31+
'ca-central-1',
32+
'me-south-1',
33+
'sa-east-1',
2834
];
2935

3036
const configurationOptions = ['project', 'profile', 'containers'];
@@ -46,7 +52,7 @@ export function amplifyConfigure(settings: AmplifyConfiguration): Promise<void>
4652
.sendCarriageReturn()
4753
.wait('Specify the AWS Region');
4854

49-
singleSelect(chain, s.region, regionOptions);
55+
singleSelect(chain, s.region, amplifyRegions);
5056

5157
chain
5258
.wait('user name:')

packages/amplify-codegen-e2e-core/src/init/initProjectHelper.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { nspawn as spawn, getCLIPath, singleSelect, addCircleCITags } from '..';
22
import { KEY_DOWN_ARROW, AmplifyFrontend } from '../utils';
3+
import { amplifyRegions } from '../configure';
34

45
const defaultSettings = {
56
name: '\r',
@@ -20,21 +21,6 @@ const defaultSettings = {
2021
providerConfig: undefined
2122
};
2223

23-
export const amplifyRegions = [
24-
'us-east-1',
25-
'us-east-2',
26-
'us-west-2',
27-
'eu-west-1',
28-
'eu-west-2',
29-
'eu-central-1',
30-
'ap-northeast-1',
31-
'ap-northeast-2',
32-
'ap-southeast-1',
33-
'ap-southeast-2',
34-
'ap-south-1',
35-
'ca-central-1',
36-
];
37-
3824
export function initJSProjectWithProfile(cwd: string, settings: Object = {}): Promise<void> {
3925
const s = { ...defaultSettings, ...settings };
4026
let env;

packages/appsync-modelgen-plugin/src/__tests__/utils/process-connections.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import {
22
processConnections,
33
CodeGenConnectionType,
4-
CodeGenFieldConnection,
54
CodeGenFieldConnectionHasMany,
65
CodeGenFieldConnectionBelongsTo,
76
CodeGenFieldConnectionHasOne,
87
getConnectedField,
98
} from '../../utils/process-connections';
10-
import { CodeGenModelMap, CodeGenModel } from '../../visitors/appsync-visitor';
9+
import { CodeGenModelMap } from '../../visitors/appsync-visitor';
1110
import { processConnectionsV2 } from '../../utils/process-connections-v2';
1211

1312
describe('process connection', () => {
@@ -772,5 +771,6 @@ describe('process connection', () => {
772771
expect(connectionInfo.isConnectingFieldAutoCreated).toEqual(false);
773772
});
774773
});
774+
775775
});
776776
});

0 commit comments

Comments
 (0)