Skip to content

Commit 1e86dd8

Browse files
authored
Merge pull request #41 from swiftlang/fb-powershell-scripts
Add support for powershell scripts license header checking
2 parents 6aa41c1 + f299103 commit 1e86dd8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/scripts/check-license-header.sh

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ while IFS= read -r file_path; do
5757
h) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;;
5858
c) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;;
5959
sh) expected_file_header=$(cat <(echo '#!/bin/bash') <(sed -e 's|@@|##|g' <<<"${expected_file_header_template}")) ;;
60+
ps1) expected_file_header=$(sed -e 's|@@|##|g' <<<"${expected_file_header_template}") ;;
6061
kts) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;;
6162
gradle) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;;
6263
groovy) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;;

tests/test.ps1

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## ===----------------------------------------------------------------------===##
2+
##
3+
## This source file is part of the Swift.org open source project
4+
##
5+
## Copyright (c) 2024 Apple Inc. and the Swift project authors
6+
## Licensed under Apache License v2.0 with Runtime Library Exception
7+
##
8+
## See https://swift.org/LICENSE.txt for license information
9+
## See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
##
11+
## ===----------------------------------------------------------------------===##

0 commit comments

Comments
 (0)