Skip to content

Commit 88a021d

Browse files
author
Fabiana Severin
committed
Adding Copyright headers, header checking script and header writing script
1 parent 51be34d commit 88a021d

File tree

13 files changed

+473
-119
lines changed

13 files changed

+473
-119
lines changed

.github/workflows/build-and-release.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,24 @@ on:
88
branches: [ main ]
99

1010
jobs:
11-
# lint:
12-
# runs-on: ubuntu-latest
13-
# steps:
14-
# - uses: actions/checkout@v4
15-
# - name: Setup Node.js
16-
# uses: actions/setup-node@v4
17-
# with:
18-
# node-version: '20'
19-
# cache: 'npm'
20-
# - name: Install and lint
21-
# run: |
22-
# npm ci
23-
# npm run lint
24-
# npm run format
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20'
19+
cache: 'npm'
20+
- name: Install and lint
21+
run: |
22+
npm ci
23+
npm run lint
24+
npm run format
2525
2626
build:
2727
runs-on: ubuntu-latest
28+
needs: [lint]
2829
outputs:
2930
version: ${{ steps.version.outputs.version }}
3031
steps:
@@ -76,7 +77,7 @@ jobs:
7677

7778
test:
7879
runs-on: ubuntu-latest
79-
needs: [build] #don't forget to add lint later
80+
needs: [build]
8081
strategy:
8182
matrix:
8283
node-version: [18, 20, 22]

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,26 @@ When modifying dependencies (`package.json`), make sure to:
172172

173173
We require package-lock.json to be checked in to ensure consistent installations across development environments.
174174

175+
### Copyright Headers
176+
All source files in the bin, scripts, src, and test folders must include a copyright header containing both the words "Copyright" and "Amazon.com". The standard header format is:
177+
178+
```
179+
/*
180+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
181+
SPDX-License-Identifier: Apache-2.0
182+
*/
183+
```
184+
185+
To check if your files have proper headers:
186+
```shell script
187+
npm run check-headers
188+
```
189+
190+
To automatically add headers to files missing them:
191+
```shell script
192+
npm run add-headers
193+
```
194+
175195
### Troubleshooting
176196

177197
While running integration tests, you might encounter the Docker Hub rate limit error with the following body:

0 commit comments

Comments
 (0)