Skip to content

Commit

Permalink
Merge pull request #2104 from openedx/feanil/change_upgrade_directory
Browse files Browse the repository at this point in the history
build: Change how we run `make upgrade`.

Dependabot now seems to be able to run pip-compile on *.in files and produce the relevant *.txt file. However it does this in the same directory as the .in file so the output is slightly different than when we do it from a different directory. I want to try to use dependabot here but also enable our make upgrade tooling to see if they catch different things or if they are mostly the same. However, without this change there will be some comments that will keep changing back an forth like they did in #2096
  • Loading branch information
feanil committed Feb 17, 2023
2 parents 3371113 + 488be4a commit b0201da
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ $(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"

# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
PIP_COMPILE = pip-compile --rebuild --upgrade $(PIP_COMPILE_OPTS)
PIP_COMPILE = cd requirements/; pip-compile --rebuild --upgrade $(PIP_COMPILE_OPTS)

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -qr requirements/pip-tools.txt
# Make sure to compile files after any other files they include!
$(PIP_COMPILE) --allow-unsafe -o requirements/pip.txt requirements/pip.in
$(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in
$(PIP_COMPILE) --allow-unsafe -o pip.txt pip.in
$(PIP_COMPILE) -o pip-tools.txt pip-tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
$(PIP_COMPILE) -o requirements/base.txt requirements/base.in
$(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in
$(PIP_COMPILE) -o base.txt base.in
$(PIP_COMPILE) -o dev.txt dev.in

clean: ## remove built html files
make -C en_us clean
Expand Down

0 comments on commit b0201da

Please sign in to comment.