mirror of
https://github.com/openXC7/prjxray.git
synced 2026-09-04 00:40:23 +02:00
ci: mv update-contributing.py scripts/
Signed-off-by: Unai Martinez-Corral <[email protected]>
This commit is contained in:
committed by
Hans Baier
parent
3d801be604
commit
e8b8df8ce8
Executable
+45
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (C) 2017-2020 The Project X-Ray Authors.
|
||||
#
|
||||
# Use of this source code is governed by a ISC-style
|
||||
# license that can be found in the LICENSE file or at
|
||||
# https://opensource.org/licenses/ISC
|
||||
#
|
||||
# SPDX-License-Identifier: ISC
|
||||
|
||||
# Header
|
||||
contrib = ["""\
|
||||
# Contributing to Project X-Ray
|
||||
"""]
|
||||
|
||||
# Extract the "Contributing" section from README.md
|
||||
found = False
|
||||
for line in open('README.md'):
|
||||
if found:
|
||||
if line.startswith('# '):
|
||||
# Found the next top level header
|
||||
break
|
||||
contrib.append(line)
|
||||
else:
|
||||
if line.startswith('# Contributing'):
|
||||
found = True
|
||||
|
||||
# Footer
|
||||
contrib.append(
|
||||
"""\
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
|
||||
This file is generated from [README.md](README.md), please edit that file then
|
||||
run the `./.github/update-contributing.py`.
|
||||
|
||||
""")
|
||||
|
||||
open("CONTRIBUTING.md", "w").write("".join(contrib))
|
||||
Reference in New Issue
Block a user