Skip to content

Commit

Permalink
Update license headers
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 committed Jul 26, 2021
1 parent d25a466 commit 367b842
Show file tree
Hide file tree
Showing 45 changed files with 108 additions and 124 deletions.
2 changes: 1 addition & 1 deletion eng/common/internal/Tools.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Collections.Generic;
Expand Down
11 changes: 5 additions & 6 deletions src/Microsoft.DotNet.Build.Tasks.Feed/src/PushToBlobFeed.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.Arcade.Common;
using Microsoft.Build.Framework;
Expand Down Expand Up @@ -31,9 +30,9 @@ public class PushToBlobFeed : MSBuildTaskBase

/// <summary>
/// Enables idempotency when Overwrite is false.
///
///
/// false: (default) Attempting to upload an item that already exists fails.
///
///
/// true: When an item already exists, download the existing blob to check if it's
/// byte-for-byte identical to the one being uploaded. If so, pass. If not, fail.
/// </summary>
Expand Down Expand Up @@ -139,8 +138,8 @@ private async Task<bool> ExecuteAsync()

if (PublishFlatContainer)
{
await blobFeedAction.PublishToFlatContainerAsync(ItemsToPush,
MaxClients,
await blobFeedAction.PublishToFlatContainerAsync(ItemsToPush,
MaxClients,
pushOptions);
blobArtifacts = ConcatBlobArtifacts(blobArtifacts, ItemsToPush);
}
Expand Down Expand Up @@ -177,7 +176,7 @@ await blobFeedAction.PublishToFlatContainerAsync(ItemsToPush,
blobArtifacts = ConcatBlobArtifacts(blobArtifacts, symbolItems);
}

if (!(MSBuildListSplitter.GetNamedProperties(ManifestBuildData).ContainsKey("Location") ||
if (!(MSBuildListSplitter.GetNamedProperties(ManifestBuildData).ContainsKey("Location") ||
MSBuildListSplitter.GetNamedProperties(ManifestBuildData).ContainsKey("InitialAssetsLocation")))
{
string[] locationAttribute = new string[] { $"Location={ExpectedFeedUrl}" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
#

set -e

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand All @@ -27,7 +27,7 @@ execute(){
package_all
generate_all
create_source_tarball

# Actually Build Package Files
(cd ${PACKAGE_SOURCE_DIR}; debuild -us -uc)
}
Expand Down Expand Up @@ -63,7 +63,7 @@ parse_args_and_set_env_vars(){
;;
esac
done

# Special Input Directories + Paths
ABSOLUTE_PLACEMENT_DIR="${INPUT_DIR}/\$"
PACKAGE_ROOT_PLACEMENT_DIR="${INPUT_DIR}/package_root"
Expand All @@ -73,7 +73,7 @@ parse_args_and_set_env_vars(){
}

print_help(){
echo "Usage: package_tool [-i <INPUT_DIR>] [-o <OUTPUT_DIRECTORY>]
echo "Usage: package_tool [-i <INPUT_DIR>] [-o <OUTPUT_DIRECTORY>]
[-n <PACKAGE_NAME>] [-v <PACKAGE_VERSION>] [-h]
REQUIRED:
Expand Down Expand Up @@ -114,13 +114,13 @@ validate_inputs(){
echo $CONFIG
ret=1
fi

return $ret
}

parse_config_and_set_env_vars(){
extract_base_cmd="python $SCRIPT_DIR/scripts/extract_json_value.py"

# Arguments Take Precedence over Config
[ -z "$PACKAGE_VERSION" ] && PACKAGE_VERSION="$($extract_base_cmd $CONFIG "release.package_version")"
[ -z "$PACKAGE_NAME" ] && PACKAGE_NAME="$($extract_base_cmd $CONFIG "package_name")"
Expand Down Expand Up @@ -151,7 +151,7 @@ package_all(){
package_absolute_placement
package_samples
package_docs
package_install_scripts
package_install_scripts
}

generate_all(){
Expand Down Expand Up @@ -179,18 +179,18 @@ package_package_root_placement(){
package_absolute_placement(){
if [[ -d "$ABSOLUTE_PLACEMENT_DIR" ]]; then
abs_in_package_dir="\$"

add_dir_to_install ${ABSOLUTE_PLACEMENT_DIR} $abs_in_package_dir

# Get List of all files in directory tree, relative to ABSOLUTE_PLACEMENT_DIR
abs_files=( $(_get_files_in_dir_tree $ABSOLUTE_PLACEMENT_DIR) )

# For each file add a a system placement
for abs_file in ${abs_files[@]}
do
parent_dir=$(dirname $abs_file)
filename=$(basename $abs_file)

add_system_file_placement "$abs_in_package_dir/$abs_file" "/$parent_dir"
done
fi
Expand Down Expand Up @@ -224,7 +224,7 @@ generate_config_templates(){
generate_manpages(){
if [[ -f "$DOCS_JSON_PATH" ]]; then
mkdir -p $DOCS_DIR

# Generate the manpages from json spec
python ${SCRIPT_DIR}/scripts/manpage_generator.py ${DOCS_JSON_PATH} ${DOCS_DIR}
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
#

# Parses debian_config.json and generates appropriate templates
Expand Down Expand Up @@ -38,9 +37,9 @@ def dst(self, dt):
def generate_and_write_all(config_data, template_dir, output_dir, package_name=None, package_version=None):
try:
changelog_contents = generate_changelog(
config_data,
template_dir,
package_name=package_name,
config_data,
template_dir,
package_name=package_name,
package_version=package_version)

control_contents = generate_control(config_data, template_dir, package_name=package_name)
Expand Down Expand Up @@ -83,7 +82,7 @@ def generate_changelog(config_data, template_dir, package_version=None, package_
template = get_template(template_dir, FILE_CHANGELOG)

release_data = config_data["release"]

# Allow for Version Override
config_package_version = release_data["package_version"]
package_version = package_version or config_package_version
Expand All @@ -96,7 +95,7 @@ def generate_changelog(config_data, template_dir, package_version=None, package_

PACKAGE_NAME=package_name or config_data["package_name"],
MAINTAINER_NAME=config_data["maintainer_name"],
MAINTAINER_EMAIL=config_data["maintainer_email"],
MAINTAINER_EMAIL=config_data["maintainer_email"],
DATE=datetime.datetime.now(UTC()).strftime(CHANGELOG_DATE_FORMAT)
)

Expand Down Expand Up @@ -165,7 +164,7 @@ def generate_symlinks(config_data, package_name=None):
symlink_entries.append( '%s %s' % (package_abs_path, symlink_path) )

return '\n'.join(symlink_entries)

# Helper Functions
def get_package_root(config_data, package_name=None):
config_install_root = config_data.get("install_root", None)
Expand All @@ -182,7 +181,7 @@ def get_dependendent_packages_string(debian_dependency_data):
return ""

dependencies = []

for debian_package_name in debian_dependency_data:
dep_str = debian_package_name

Expand Down Expand Up @@ -239,7 +238,7 @@ def parse_and_validate_args():
output_dir = sys.argv[3]
name_override = None
version_override = None

if len(sys.argv) >= 5:
name_override = sys.argv[4]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
#

# This file is not intended to be executed directly
Expand Down Expand Up @@ -46,7 +45,7 @@ add_system_dir_placement(){
abs_installation_dir=$2

dir_files=( $(_get_files_in_dir_tree $PACKAGE_SOURCE_DIR/$in_package_dir) )

# If in_package_dir isn't empty include a slash
if [ ! -z "$in_package_dir" ]; then
in_package_dir="${in_package_dir}/"
Expand Down Expand Up @@ -92,10 +91,10 @@ add_file_to_install(){

# add_dir_to_install
# Summary: Adds contents of a directory on the local filesystem to the package and installs them rooted at INSTALL_ROOT
# Note: Does not install the directory passed, only its contents
# Note: Does not install the directory passed, only its contents
# Usage: add_dir_to_install {relative path of directory to copy} {relative path to INSTALL_ROOT to place directory tree}
add_dir_to_install(){

copy_from_dir=$1
rel_install_path=$2

Expand Down Expand Up @@ -127,7 +126,7 @@ _copy_files_to_package(){
do
local parent_dir=$(dirname $rel_filepath)
local filename=$(basename $rel_filepath)

mkdir -p ${PACKAGE_SOURCE_DIR}/${package_dest_dir}/${parent_dir}

# Ignore $parent_dir if it there isn't one
Expand All @@ -136,7 +135,7 @@ _copy_files_to_package(){
else
cp "${local_root_dir}/${rel_filepath}" "${PACKAGE_SOURCE_DIR}/${package_dest_dir}/${parent_dir}"
fi

done
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
#

# Extract Json Value
Expand All @@ -24,7 +23,7 @@ def help_and_exit(msg=None):
sys.exit(1)

def parse_and_validate_args():

if len(sys.argv) < 3:
help_and_exit(msg="Error: Invalid Args")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
#

# manpage_generator
Expand Down Expand Up @@ -203,10 +202,10 @@ def generate_options_section(tool_name, tool_data):#
parameter = option_data.get("parameter", None)
description = option_data.get("description", "")

option_specifiers_string = _option_string_helper(specifier_short,
specifier_long,
parameter,
include_brackets = False,
option_specifiers_string = _option_string_helper(specifier_short,
specifier_long,
parameter,
include_brackets = False,
delimiter=' ", " ')

format_args = {
Expand All @@ -221,27 +220,27 @@ def generate_options_section(tool_name, tool_data):#
def generate_author_section(tool_name, tool_data):#
roff_text_builder = []
roff_text_builder.append(".SH AUTHOR")

author_format = '.B "{author_name}" " " \n.RI ( "{author_email}" )'

author_name = tool_data.get("author", "")
author_email = tool_data.get("author_email", "")

format_args = {
"author_name" : author_name,
"author_email" : author_email
}

roff_text_builder.append(author_format.format(**format_args))

return SECTION_SEPARATOR.join(roff_text_builder)

def generate_copyright_section(tool_name, tool_data):#
roff_text_builder = []
roff_text_builder.append(".SH COPYRIGHT")

copyright_data = tool_data.get("copyright")

roff_text_builder.append('.B "{0}"'.format(copyright_data))

return SECTION_SEPARATOR.join(roff_text_builder)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
#

install_dependencies(){
Expand All @@ -18,4 +17,4 @@ setup(){
install_dependencies
}

setup
setup
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
#

install_dependencies(){
Expand All @@ -25,4 +24,4 @@ setup(){
install_bats
}

setup
setup
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
#

Source: {PACKAGE_NAME}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Comment: Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information.
Comment: Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.

Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
# See the LICENSE file in the project root for more information.
#

{overrides}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Comment: Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information.
Comment: Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license.

Files: *
Copyright: {COPYRIGHT_TEXT}
Expand Down
Loading

0 comments on commit 367b842

Please sign in to comment.