Skip to content

Commit eafaa0d

Browse files
committed
Added an --ignore-resources switch to bin/mkrelease, as a stopgap measure before moving to yarn.
- Legacy-Id: 16717
1 parent 3336f4a commit eafaa0d

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

bin/mkrelease

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,16 @@ trap 'echo "$program($LINENO): Command failed with error code $? ([$$] $0 $*)";
7979
# Option parsing
8080

8181
# Options
82-
shortopts=hmnpvV
83-
longopts=help,message,dry-run,permit-migr-mix,verbose,version
82+
shortopts=hmnipvV
83+
longopts=help,message,dry-run,ignore-resources,permit-migr-mix,verbose,version
8484

8585
# Default values
8686
MSG=""
8787
PROJ=ietfdb
8888
VERFILE=ietf/__init__.py
8989
SETTINGS=ietf/settings.py
9090
PERMIT_MIGR_MIX=""
91+
IGNORE_RESOURCES=""
9192
do=""
9293

9394
if [ "$(uname)" = "Linux" ]; then
@@ -108,6 +109,7 @@ while true ; do
108109
-h| --help) usage; exit;; # Show this help, then exit
109110
-m| --message) MSG=$2; shift;; # Specify a commit message
110111
-n| --dry-run) do="echo ==>";; # Show what would be done
112+
-i| --ignore-resources) IGNORE_RESOURCES=1;; # Don't try to update resources
111113
-p| --permit-migr-mix) PERMIT_MIGR_MIX=1;; # Permit mixed schema and data migrations
112114
-v| --verbose) VERBOSE=1;; # Be more talkative
113115
-V| --version) version; exit;; # Show program version, then exit
@@ -202,15 +204,16 @@ if [ -z "$PERMIT_MIGR_MIX" ]; then
202204
fi
203205
fi
204206

205-
note "Updating bower assets ..."
206-
$do ietf/manage.py bower_install > .mkrelease-bower-install.log
207-
$do rm .mkrelease-bower-install.log # This happens at once unless the previous command returns error
208-
$do svn st ietf/externals/static | grep -v '^\?' || true
209-
$do svn commit ietf/externals/static -m "Updated bower-managed static web assets"
210-
# Get rid of bower-installed files which we don't use:
211-
$do rm -rf ietf/externals/static/datatracker/
212-
$do rm $(svn st ietf/externals/ | grep '^\?' | awk '{print $2}')
213-
207+
if [ -z "$IGNORE_RESOURCES" ]; then
208+
note "Updating bower assets ..."
209+
$do ietf/manage.py bower_install > .mkrelease-bower-install.log
210+
$do rm .mkrelease-bower-install.log # This happens at once unless the previous command returns error
211+
$do svn st ietf/externals/static | grep -v '^\?' || true
212+
$do svn commit ietf/externals/static -m "Updated bower-managed static web assets"
213+
# Get rid of bower-installed files which we don't use:
214+
$do rm -rf ietf/externals/static/datatracker/
215+
$do rm -f $(svn st ietf/externals/ | grep '^\?' | awk '{print $2}')
216+
fi
214217

215218
note "Collecting static files ..."
216219
$do ietf/manage.py collectstatic --noinput --ignore=bower.json --ignore='README.*' --ignore=rev | grep -v "Found another file with the destination path"

0 commit comments

Comments
 (0)