Skip to content

Commit 64d6736

Browse files
Merge remote-tracking branch 'origin/main' into personal/jennifer/7.45.1.dev0.bootstrap-merge
# Conflicts: # bootstrap/package-lock.json # bootstrap/package.json # package-lock.json # package.json
2 parents 93d3daa + 709c123 commit 64d6736

23 files changed

Lines changed: 166 additions & 799 deletions

.bowerrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ charset = utf-8
4141
trim_trailing_whitespace = true
4242
insert_final_newline = true
4343

44+
[package.json]
45+
indent_style = space
46+
indent_size = 2
47+
end_of_line = lf
48+
charset = utf-8
49+
trim_trailing_whitespace = true
50+
insert_final_newline = true
51+
4452
# Settings for cypress tests
4553
# ---------------------------------------------------------
4654
# StandardJS Style

.github/workflows/build.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
workflow_dispatch:
9+
inputs:
10+
publish:
11+
description: 'Create Production Release'
12+
required: true
13+
type: boolean
14+
15+
jobs:
16+
publish:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Get Next Version
25+
if: ${{ github.event.inputs.publish == 'true' }}
26+
id: semver
27+
uses: ietf-tools/semver-action@v1
28+
with:
29+
token: ${{ github.token }}
30+
branch: main
31+
32+
- name: Set Next Version Env Var
33+
if: ${{ github.event.inputs.publish == 'true' }}
34+
env:
35+
NEXT_VERSION: ${{ steps.semver.outputs.next }}
36+
run: |
37+
echo "NEXT_VERSION=$next" >> $GITHUB_ENV
38+
39+
- name: Create Draft Release
40+
uses: ncipollo/release-action@v1
41+
if: ${{ github.event.inputs.publish == 'true' }}
42+
with:
43+
prerelease: true
44+
draft: false
45+
commit: ${{ github.sha }}
46+
tag: ${{ env.NEXT_VERSION }}
47+
name: ${{ env.NEXT_VERSION }}
48+
body: '*pending*'
49+
token: ${{ secrets.GITHUB_TOKEN }}
50+
51+
- name: Set Build Variables
52+
run: |
53+
if [[ $NEXT_VERSION ]]; then
54+
echo "Using AUTO SEMVER mode: $NEXT_VERSION"
55+
echo "SHOULD_DEPLOY=true" >> $GITHUB_ENV
56+
echo "PKG_VERSION=$NEXT_VERSION" >> $GITHUB_ENV
57+
echo "PKG_VERSION_STRICT=${NEXT_VERSION#?}" >> $GITHUB_ENV
58+
elif [[ "$GITHUB_REF" =~ ^refs/tags/v* ]]; then
59+
echo "Using TAG mode: $GITHUB_REF_NAME"
60+
echo "SHOULD_DEPLOY=true" >> $GITHUB_ENV
61+
echo "PKG_VERSION=$GITHUB_REF_NAME" >> $GITHUB_ENV
62+
echo "PKG_VERSION_STRICT=${GITHUB_REF_NAME#?}" >> $GITHUB_ENV
63+
else
64+
echo "Using TEST mode: v7.0.0-dev.$GITHUB_RUN_NUMBER"
65+
echo "SHOULD_DEPLOY=false" >> $GITHUB_ENV
66+
echo "PKG_VERSION=v3.0.0-dev.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
67+
echo "PKG_VERSION_STRICT=3.0.0-dev.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
68+
fi
69+
70+
- name: Setup Node.js
71+
uses: actions/setup-node@v3.0.0
72+
with:
73+
node-version: 16.x
74+
75+
- name: Setup Python
76+
uses: actions/setup-python@v2
77+
with:
78+
python-version: '3.x'
79+
80+
- name: Make Release Build
81+
env:
82+
DEBIAN_FRONTEND: noninteractive
83+
run: |
84+
echo "Installing NPM dependencies..."
85+
npm install
86+
npm install -g grunt-cli
87+
cd bootstrap
88+
npm install
89+
echo "Generating bootstrap files..."
90+
grunt dist
91+
cp -r dist/. ../ietf/static/ietf/bootstrap/
92+
cd ..
93+
echo "Setting version $PKG_VERSION_STRICT..."
94+
sed -i -r -e "s/^__version__ += '.*'$/__version__ = '$PKG_VERSION_STRICT'/" ietf/__init__.py
95+
echo "Build release tarball..."
96+
mkdir -p /home/runner/work/release
97+
tar -czf /home/runner/work/release/release.tar.gz -X dev/deploy/exclude-patterns.txt .
98+
99+
- name: Update CHANGELOG
100+
id: changelog
101+
uses: Requarks/changelog-action@v1
102+
if: env.SHOULD_DEPLOY == 'true'
103+
with:
104+
token: ${{ github.token }}
105+
tag: ${{ env.PKG_VERSION }}
106+
writeToFile: false
107+
108+
- name: Create Release
109+
uses: ncipollo/release-action@v1
110+
if: env.SHOULD_DEPLOY == 'true'
111+
with:
112+
allowUpdates: true
113+
draft: false
114+
tag: ${{ env.PKG_VERSION }}
115+
name: ${{ env.PKG_VERSION }}
116+
body: ${{ steps.changelog.outputs.changes }}
117+
artifacts: "/home/runner/work/release/release.tar.gz"
118+
token: ${{ secrets.GITHUB_TOKEN }}
119+
120+
- name: Upload Build Artifacts
121+
uses: actions/upload-artifact@v2.3.1
122+
if: env.SHOULD_DEPLOY == 'false'
123+
with:
124+
name: release
125+
path: /home/runner/work/release/release.tar.gz

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: CodeQL Analysis
22

33
on:
4-
push:
5-
branches: [ main ]
4+
# push:
5+
# branches: [ main ]
66
pull_request:
77
branches: [ main ]
88
schedule:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,4 @@
5555
*.pyc
5656
__pycache__
5757
node_modules
58+
ietf/static/ietf/bootstrap

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
save-exact = true
2+
save-prefix = ""

bootstrap/post-install.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const fs = require('fs-extra')
2+
const path = require('path')
3+
4+
fs.copySync(path.join(process.cwd(), 'dist'), path.join(process.cwd(), '../ietf/static/ietf/bootstrap'))

control

Lines changed: 0 additions & 15 deletions
This file was deleted.
File renamed without changes.

dev/deploy/exclude-patterns.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.devcontainer
2+
.github
3+
.vscode
4+
.git
5+
./bootstrap
6+
./cypress
7+
./dev
8+
./docker
9+
./hooks
10+
./notes
11+
./svn-history
12+
./test
13+
./.bowerrc
14+
.editorconfig
15+
.eslintrc.js
16+
.npmrc
17+
.pylintrc
18+
cypress.json
19+
hold-for-merge
20+
ready-for-merge
21+
node_modules
22+
release.tar.gz

0 commit comments

Comments
 (0)