File tree 3 files changed +20
-10
lines changed
3 files changed +20
-10
lines changed Original file line number Diff line number Diff line change 25
25
needs-python : ${{ true }}
26
26
needs-node : ${{ false }}
27
27
- name : Dependencies
28
- command : bin/deps
28
+ command : bin/github-actions- deps
29
29
needs-python : ${{ true }}
30
30
needs-node : ${{ false }}
31
31
- name : Licenses
Original file line number Diff line number Diff line change @@ -84,15 +84,6 @@ requirements/%.txt: requirements/%.in
84
84
PATH=" /opt/warehouse/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
85
85
bin/pip-compile --allow-unsafe --generate-hashes --output-file=$@ $<
86
86
87
- github-actions-deps :
88
- ifneq ($(GITHUB_BASE_REF ) , false)
89
- git fetch origin $(GITHUB_BASE_REF):refs/remotes/origin/$(GITHUB_BASE_REF)
90
- # Check that the following diff will exit with 0 or 1
91
- git diff --name-only FETCH_HEAD || test $? -le 1 || exit 1
92
- # Make the dependencies if any changed files are requirements files, otherwise exit
93
- git diff --name-only FETCH_HEAD | grep '^requirements/' || exit 0 && bin/deps
94
- endif
95
-
96
87
initdb :
97
88
docker-compose run --rm web psql -h db -d postgres -U postgres -c " SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname ='warehouse';"
98
89
docker-compose run --rm web psql -h db -d postgres -U postgres -c " DROP DATABASE IF EXISTS warehouse"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ # Click requires us to ensure we have a well configured environment to run
5
+ # our click commands. So we'll set our environment to ensure our locale is
6
+ # correct.
7
+ export LC_ALL=" ${ENCODING:- en_US.UTF-8} "
8
+ export LANG=" ${ENCODING:- en_US.UTF-8} "
9
+
10
+ # Print all the followng commands
11
+ set -x
12
+
13
+ if [[ -z " ${GITHUB_BASE_REF} " ]]; then
14
+ git fetch origin $( GITHUB_BASE_REF) :refs/remotes/origin/$( GITHUB_BASE_REF)
15
+ # Check that the following diff will exit with 0 or 1
16
+ git diff --name-only FETCH_HEAD || test $? -le 1 || exit 1
17
+ # Make the dependencies if any changed files are requirements files, otherwise exit
18
+ git diff --name-only FETCH_HEAD | grep ' ^requirements/' || exit 0 && bin/deps
19
+ fi
You can’t perform that action at this time.
0 commit comments