Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/gen_author_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ sorted_xml_authors() {

# output authors as an XML <author> element
for a in $AUTHORS; do

FULL_NAME=`grep $a $0 | awk -F'"' '{print $2}'`
ORGANIZATION=`grep $a $0 | awk -F'"' '{print $4}'`
FIRST_NAME=`echo $FULL_NAME | awk '{print $1}'`
Expand Down Expand Up @@ -74,7 +73,3 @@ main() {


main "$@"


#### AUTHOR INFO ####
#kwatsen: "Kent Watsen" "Watsen Networks" "kent+ietf@watsen.net"
24 changes: 13 additions & 11 deletions .github/workflows/gen_index_html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ echo "<table class=\"bg\">" >> index.html
echo " <tr class=\"bg\">" >> index.html
echo " <th class=\"bg\"><b>Updated</b></th>" >> index.html
echo " <th class=\"bg\"><b>Pull Request</b></th>" >> index.html
echo " <th class=\"bg\"><b>Merge Operation</b></th>" >> index.html
echo " <th class=\"bg\"><b>Formats</b></th>" >> index.html
echo " <th class=\"bg\"><b>Actions</b></th>" >> index.html
echo " </tr>" >> index.html
Expand All @@ -41,28 +40,31 @@ for branch in $SORTED; do
NUMBER=`grep NUMBER $branch/metadata.txt | awk '{print $2}'`
TITLE=`grep TITLE $branch/metadata.txt | awk '{for (i=2; i<NF; i++) printf $i " "; print $NF}'`
DATE=`grep DATE $branch/metadata.txt | awk '{print $2}'`
grep -q BASE $branch/metadata.txt || BASE="main" # delete this after PR #36 merges...
grep -q BASE $branch/metadata.txt && BASE=`grep BASE $branch/metadata.txt | awk '{print $2}'`

# the "Updated" column
echo " <td class=\"bg\" nowrap>$DATE</td>" >> index.html

# the "Pull Request" column
if [ $branch = "main" ]; then
echo " <td class=\"bg\">N/A, since this is the \"main\" branch (last updated by <a href=\"https://github.com/netmod-wg/yang-xml/pull/$NUMBER\">#$NUMBER: $TITLE</a>).</td>" >> index.html
else
echo " <td class=\"bg\"><a href=\"https://github.com/netmod-wg/yang-xml/pull/$NUMBER\">#$NUMBER: $TITLE</a></td>" >> index.html
fi

if [ $branch = "main" ]; then
echo " <td class=\"bg\">N/A, since this is the <a href=\"https://github.com/netmod-wg/yang-xml/tree/main\">\"main\"</a> branch.</td>" >> index.html
else
echo " <td class=\"bg\">Branch <a href=\"https://github.com/netmod-wg/yang-xml/tree/$branch\">\"$branch\"</a> merges into branch <a href=\"https://github.com/netmod-wg/yang-xml/tree/$BASE\">\"$BASE\"</a>.</td>" >> index.html
fi
# get main's draft version number (delete the trailing '|| echo "00"' once merged into main)
MVER=`ls -1 main/draft-yn-netmod-yang-xml-[0-9][0-9].xml | sed -e 's/.*-//' -e 's/\.xml$//' || echo "00"`

# get branch's draft version number (yes, branch may be "main" too)
BVER=`ls -1 $branch/draft-yn-netmod-yang-xml-[0-9][0-9].xml | sed -e 's/.*-//' -e 's/\.xml$//'`

echo " <td nowrap class=\"bg\"> <table> <tr> <td nowrap><a href=\"$branch/draft-yn-netmod-yang-xml-00.html\">html</a> / <a href=\"$branch/draft-yn-netmod-yang-xml-00.txt\">text</a> / <a href=\"$branch/draft-yn-netmod-yang-xml-00.xml\">xml</a></td> </tr> </table> </td>" >> index.html
# the "Formats" column
echo " <td nowrap class=\"bg\"> <table> <tr> <td nowrap><a href=\"$branch/draft-yn-netmod-yang-xml-$BVER.html\">html</a> / <a href=\"$branch/draft-yn-netmod-yang-xml-$BVER.txt\">text</a> / <a href=\"$branch/draft-yn-netmod-yang-xml-$BVER.xml\">xml</a></td> </tr> </table> </td>" >> index.html

# the "Actions" column
if [ $branch = "main" ]; then
echo " <td nowrap class=\"bg\"><a href=\"https://author-tools.ietf.org/api/iddiff?doc_1=draft-yn-netmod-yang-xml&url_2=https://netmod-wg.github.io/yang-xml/main/draft-yn-netmod-yang-xml-00.txt.paged.txt\">Diff with Datatracker</a> </td>" >> index.html
echo " <td nowrap class=\"bg\"><a href=\"https://author-tools.ietf.org/api/iddiff?doc_1=draft-yn-netmod-yang-xml&url_2=https://netmod-wg.github.io/yang-xml/main/draft-yn-netmod-yang-xml-$MVER.txt.paged.txt\">Diff with Datatracker</a> </td>" >> index.html
else
echo " <td nowrap class=\"bg\"> <a href=\"https://author-tools.ietf.org/api/iddiff?url_1=https://netmod-wg.github.io/yang-xml/$BASE/draft-yn-netmod-yang-xml-00.txt&url_2=https://netmod-wg.github.io/yang-xml/$branch/draft-yn-netmod-yang-xml-00.txt\">Diff with Main</a> </td>" >> index.html
echo " <td nowrap class=\"bg\"> <a href=\"https://author-tools.ietf.org/api/iddiff?url_1=https://netmod-wg.github.io/yang-xml/main/draft-yn-netmod-yang-xml-$MVER.txt&url_2=https://netmod-wg.github.io/yang-xml/$branch/draft-yn-netmod-yang-xml-$BVER.txt\">Diff with Main</a> </td>" >> index.html
fi
echo " </tr>" >> index.html
done
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pull_request_closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ jobs:
tar -xzvf drafts.tgz
rm drafts.tgz

# if merged...
# if merged... (i.e., PR succeeded)
- name: If merged, move compiled artifacts to 'main'
if: github.event.pull_request.merged == true
run: |
rm -rf mysite/main
mv mysite/${{github.head_ref}} mysite/main

# if not merged...
# if not merged... (i.e., PR failed)
- name: If not merged, just delete the branch dir
if: github.event.pull_request.merged == false
run: |
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Create mysite/index.html
run: |
chmod +x .github/workflows/gen_index_html.sh
.github/workflows/gen_index_html.sh "${{github.event.pull_request.number}}" "${{github.event.pull_request.title}}" "${{github.event.pull_request.head.ref}}"
.github/workflows/gen_index_html.sh

# recreate the drafts.tgz
- name: Recreate drafts.tgz
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/pull_request_updated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
fetch-tags: true
- name: generate authors.txt
run: |
chmod +x .github/workflows/gen_author_list.sh
Expand All @@ -38,7 +40,8 @@ jobs:
wget https://raw.githubusercontent.com/ietf-tools/rfcfold/master/rfcfold
chmod +x rfcfold
- name: Run "make"
run: make
run: |
make
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -174,9 +177,11 @@ jobs:
}
rm drafts.tgz

# create the "mysite/<branch>/" directory, in case it's not there already
# create the "mysite/<branch>/" directory (delete old if present)
- name: Create the mysite/<branch>/ directory
run: mkdir -p mysite/${{github.head_ref}}
run: |
rm -rf mysite/${{github.head_ref}}
mkdir mysite/${{github.head_ref}}

# download the just-built artifacts
- name: Download built artifacts
Expand All @@ -190,9 +195,8 @@ jobs:
mv draft-yn-netmod-*-[0-9][0-9].* mysite/${{github.head_ref}}/

# stash some metadata
- name: Stash some metadata
- name: Stash some metadata (for gen_index_html.sh)
run: |
echo "${{github.event.pull_request}}"
echo "NUMBER: ${{github.event.pull_request.number}}" > mysite/${{github.head_ref}}/metadata.txt
echo "TITLE: ${{github.event.pull_request.title}}" >> mysite/${{github.head_ref}}/metadata.txt
echo "DATE: $(date +%Y-%m-%dT%H:%M:%SZ)" >> mysite/${{github.head_ref}}/metadata.txt
Expand All @@ -207,7 +211,7 @@ jobs:
- name: Create mysite/index.html
run: |
chmod +x .github/workflows/gen_index_html.sh
.github/workflows/gen_index_html.sh "${{github.event.pull_request.number}}" "${{github.event.pull_request.title}}" "${{github.event.pull_request.head.ref}}"
.github/workflows/gen_index_html.sh

# recreate the drafts.tgz
- name: Recreate drafts.tgz
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/update_page.py

This file was deleted.

4 changes: 4 additions & 0 deletions draft-yn-netmod-yang-xml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
<t>This document is developed on GitHub at <eref target="https://github.com/netmod-wg/yang-xml"/>).
If you wish to contribute, please consider opening a pull request (PR).
See the README file for details.</t>
<t>See <eref target="https://netmod-wg.github.io/yang-xml"/> for a dashboard of the document's
status.</t>
</note>
</front>

Expand Down Expand Up @@ -913,9 +915,11 @@ leaf-list foo {
</section>

<section title="IANA Considerations" anchor="iana">
<t>FIXME</t>
</section>

<section title="Security Considerations">
<t>FIXME</t>
</section>

</middle>
Expand Down