Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Fix Travis CI PRs builds and add copyrights #52

Merged
merged 5 commits into from
May 2, 2018
Merged
Show file tree
Hide file tree
Changes from 4 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: 4 additions & 1 deletion scripts/build
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

# Usage:
# Build the project in the local environment: ./scripts/build
Expand Down
2 changes: 2 additions & 0 deletions scripts/build.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:: Copyright (c) Microsoft. All rights reserved.

@ECHO off & setlocal enableextensions enabledelayedexpansion

:: Usage:
Expand Down
5 changes: 4 additions & 1 deletion scripts/clean-up
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

APP_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )/"
source "$APP_HOME/scripts/.functions.sh"
Expand Down
2 changes: 2 additions & 0 deletions scripts/clean-up.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:: Copyright (c) Microsoft. All rights reserved.

@ECHO off & setlocal enableextensions enabledelayedexpansion

:: strlen("\scripts\") => 9
Expand Down
5 changes: 4 additions & 1 deletion scripts/compile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

# Usage:
# Compile the project in the local environment: ./scripts/compile
Expand Down
2 changes: 2 additions & 0 deletions scripts/compile.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:: Copyright (c) Microsoft. All rights reserved.

@ECHO off & setlocal enableextensions enabledelayedexpansion

:: Usage:
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Copyright (c) Microsoft. All rights reserved.
# Note: Bash doesn't parse very well shebang arguments (e.g "-e") since version 4.
# Note: Windows Bash doesn't support shebang extra params
set -e

# Note: use lowercase names for the Docker images
Expand Down
2 changes: 2 additions & 0 deletions scripts/docker/build.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:: Copyright (c) Microsoft. All rights reserved.

@ECHO off & setlocal enableextensions enabledelayedexpansion

:: Note: use lowercase names for the Docker images
Expand Down
5 changes: 4 additions & 1 deletion scripts/docker/publish
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

# Note: use lowercase names for the Docker images
DOCKER_IMAGE="azureiotpcs/pcs-storage-adapter-dotnet"
Expand Down
2 changes: 2 additions & 0 deletions scripts/docker/publish.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:: Copyright (c) Microsoft. All rights reserved.

@ECHO off & setlocal enableextensions enabledelayedexpansion

:: Note: use lowercase names for the Docker images
Expand Down
5 changes: 4 additions & 1 deletion scripts/docker/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

# Note: use lowercase names for the Docker images
DOCKER_IMAGE="azureiotpcs/pcs-storage-adapter-dotnet"
Expand Down
2 changes: 2 additions & 0 deletions scripts/docker/run.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:: Copyright (c) Microsoft. All rights reserved.

@ECHO off & setlocal enableextensions enabledelayedexpansion

:: Note: use lowercase names for the Docker images
Expand Down
9 changes: 9 additions & 0 deletions scripts/env-vars-check
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/usr/bin/env bash
# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

# Do not run during Travis CI builds, to avoid failures in case of third party PRs
if [[ "$TRAVIS_SECURE_ENV_VARS" == "false" ]]; then
echo "Info: skipping env vars check during Travis CI build"
exit 0
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming we need to this for all the repos?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, looks like several other repos also need the update.


if [[ -z "$PCS_STORAGEADAPTER_DOCUMENTDB_CONNSTRING" ]]; then
echo "Error: the PCS_STORAGEADAPTER_DOCUMENTDB_CONNSTRING environment variable is not defined."
Expand Down
2 changes: 2 additions & 0 deletions scripts/env-vars-check.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:: Copyright (c) Microsoft. All rights reserved.

@ECHO off & setlocal enableextensions enabledelayedexpansion

IF "%PCS_STORAGEADAPTER_DOCUMENTDB_CONNSTRING%" == "" (
Expand Down
3 changes: 3 additions & 0 deletions scripts/env-vars-setup
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

# Prepare the environment variables used by the application.

Expand Down
4 changes: 4 additions & 0 deletions scripts/env-vars-setup.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
:: Copyright (c) Microsoft. All rights reserved.

@ECHO off & setlocal enableextensions enabledelayedexpansion

:: Prepare the environment variables used by the application.

:: DocumentDb connection string
Expand Down
5 changes: 4 additions & 1 deletion scripts/git/fix-perms.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

# Sometimes when creating bash scripts in Windows, bash scripts will not have
# the +x flag carried over to Linux/MacOS. This script should help setting the
Expand Down
3 changes: 2 additions & 1 deletion scripts/git/pre-commit-runner-no-sandbox.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash

# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

# Path relative to .git/hooks/
Expand Down
3 changes: 2 additions & 1 deletion scripts/git/pre-commit-runner-with-sandbox.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash

# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

# Path relative to .git/hooks/
Expand Down
4 changes: 3 additions & 1 deletion scripts/git/pre-commit.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash

# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

APP_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && cd .. && pwd )/"
source "$APP_HOME/scripts/git/.functions.sh"

Expand Down
5 changes: 4 additions & 1 deletion scripts/git/setup
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

APP_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && cd .. && pwd )/"

Expand Down
2 changes: 2 additions & 0 deletions scripts/git/setup.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:: Copyright (c) Microsoft. All rights reserved.

@ECHO off & setlocal enableextensions enabledelayedexpansion

:: strlen("\scripts\git\") => 13
Expand Down
5 changes: 4 additions & 1 deletion scripts/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

# Usage:
# Run the service in the local environment: ./scripts/run
Expand Down
2 changes: 2 additions & 0 deletions scripts/run.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:: Copyright (c) Microsoft. All rights reserved.

@ECHO off & setlocal enableextensions enabledelayedexpansion

:: Usage:
Expand Down
5 changes: 4 additions & 1 deletion scripts/travis
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env bash -e
#!/usr/bin/env bash
# Copyright (c) Microsoft. All rights reserved.
# Note: Windows Bash doesn't support shebang extra params
set -e

# Example usage (see "travis help" for more information):
# travis help
Expand Down
2 changes: 2 additions & 0 deletions scripts/travis.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:: Copyright (c) Microsoft. All rights reserved.

@ECHO off & setlocal enableextensions enabledelayedexpansion

:: Example usage (see "travis help" for more information:
Expand Down