File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed
Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Check Nitric Version
2+
3+ on :
4+ pull_request :
5+ - main
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v2
13+ - name : Cache Yarn Cache
14+ uses : actions/cache@v2
15+ with :
16+ path : ' node_modules'
17+ key : ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
18+ - name : Install modules
19+ run : yarn --frozen-lockfile
20+ - name : Check nitric version
21+ run : yarn check-nitric
Original file line number Diff line number Diff line change 1010 "bump" : " standard-version" ,
1111 "build" : " tsup src/index.ts --dts --outDir lib" ,
1212 "test" : " jest" ,
13+ "check-nitric" : " ts-node ./scripts/check-nitric-version.ts" ,
1314 "test:coverage" : " jest --coverage" ,
1415 "coverage:upload" : " yarn run test:coverage && codecov" ,
1516 "prettier:check" : " prettier --check src" ,
Original file line number Diff line number Diff line change 1+ // Copyright 2021, Nitric Technologies Pty Ltd.
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+ import { nitric } from "../package.json"
15+
16+ if ( nitric . includes ( "-rc" ) ) {
17+ throw new Error ( "nitric must be set to a production version!" ) ;
18+ }
You can’t perform that action at this time.
0 commit comments