-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
35 lines (34 loc) · 995 Bytes
/
buildspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
version: 0.2
env:
variables:
BRANCH: "master"
phases:
install:
runtime-versions:
python: 3.8
pre_build:
commands:
- curr_working_dir=`pwd`
- export PIP_CONFIG_FILE=$curr_working_dir/pip.conf
- BRANCH=$(echo $CODEBUILD_WEBHOOK_BASE_REF | sed 's/refs\/heads\///')
- |
if [ "${BRANCH}" = "" ] ; then
BRANCH=$(echo $CODEBUILD_WEBHOOK_HEAD_REF | sed 's/refs\/heads\///')
fi
- echo branch $BRANCH
- |
if [ "$BRANCH" = "master"] ; then
pip install s3pypi==0.11.1
fi
build:
commands:
- |
if [ "$BRANCH" = "master"] ; then
python setup.py sdist bdist_wheel
fi
post_build:
commands:
- |
if [ "$BRANCH" = "master"] ; then
s3pypi --bucket pypi.fourzero.one --force
fi