Skip to content

Commit

Permalink
Merge branch 'main' into wsgi
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl authored Apr 16, 2024
2 parents 15cc32c + 8322ee7 commit 3743601
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Shellcheck

on:
push:
branches-ignore:
- 'release/*'
pull_request:

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install shellcheck
run: sudo apt update && sudo apt install --assume-yes shellcheck

- name: Run shellcheck
run: find . -name \*.sh | xargs shellcheck --severity=warning
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ PROTO_VERSION=v1.3.2

# SRC_DIR is from protoc perspective. ie its the destination for our checkouts/clones
SRC_DIR=opentelemetry/exporter/prometheus_remote_write/gen/
DST_DIR=../src/opentelemetry/exporter/prometheus_remote_write/gen/

#TODO:
# Check that black & protoc are installed properly
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ set -ev
# Get the latest versions of packaging tools
python3 -m pip install --upgrade pip build setuptools wheel

BASEDIR=$(dirname $(readlink -f $(dirname $0)))
BASEDIR=$(dirname "$(readlink -f "$(dirname $0)")")
DISTDIR=dist

(
cd $BASEDIR
mkdir -p $DISTDIR
rm -rf $DISTDIR/*
rm -rf ${DISTDIR:?}/*

for d in exporter/*/ opentelemetry-instrumentation/ opentelemetry-contrib-instrumentations/ opentelemetry-distro/ instrumentation/*/ propagator/*/ resource/*/ sdk-extension/*/ util/*/ ; do
(
Expand Down
8 changes: 4 additions & 4 deletions scripts/build_a_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set -ev

if [ -z $GITHUB_REF ]; then
echo 'Failed to run script, missing workflow env variable GITHUB_REF.'
exit -1
exit 1
fi

pkg_name_and_version=${GITHUB_REF#refs/tags/*}
Expand All @@ -40,13 +40,13 @@ cd $basedir

distdir=${basedir}/dist
mkdir -p $distdir
rm -rf $distdir/*
rm -rf ${distdir:?}/*

pyproject_toml_file_path=$(ls **/$pkg_name/pyproject.toml)

if [ -z $pyproject_toml_file_path ]; then
echo "Error! pyproject.toml not found for $pkg_name, can't build."
exit -1
exit 1
fi

directory_with_package=$(dirname $pyproject_toml_file_path)
Expand All @@ -61,7 +61,7 @@ pkg_tar_gz_file=${pkg_name}-${pkg_version}.tar.gz

if ! [ -f $pkg_tar_gz_file ]; then
echo 'Error! Tag version does not match version built using latest package files.'
exit -1
exit 1
fi

# Build a wheel for the source distribution
Expand Down
3 changes: 0 additions & 3 deletions scripts/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ function cov {
${1}
}

PYTHON_VERSION=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')
PYTHON_VERSION_INFO=(${PYTHON_VERSION//./ })

coverage erase

cov instrumentation/opentelemetry-instrumentation-flask
Expand Down

0 comments on commit 3743601

Please sign in to comment.