File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Very basic script checking for the existence of a file 'release.properties' in
4+ # the root of the repository. If this is present, the state of the checkout
5+ # indicates this is a proper release made through the 'release-version.sh'
6+ # script from the 'scijava-scripts' repo. Will return false if the file is not
7+ # present, can be overridden with an environment variable.
8+
9+ # The idea is to include this in automated builds to prevent accidential
10+ # attempts of publishing non-releases to PyPI.
11+
12+ set -o errexit # exit on any error
13+
14+ PROPERTIES=" release.properties"
15+
16+ test -n " $IGNORE_NO_RELEASE " &&
17+ echo " β π NOT checking for file '$PROPERTIES '... β " &&
18+ exit 0
19+
20+ cd " $( dirname " $0 " ) /.."
21+
22+ echo " Checking if '$PROPERTIES ' exists..."
23+ test -f " $PROPERTIES " && echo " All good β
" && exit 0
24+
25+ echo πππ
26+ echo ' /-----------------------------------------------------\'
27+ echo " | Couldn't find 'release.properties', STOPPING build! |"
28+ echo " | To ignore this, add this to the environment: |"
29+ echo " | > export IGNORE_NO_RELEASE=true |"
30+ echo ' \-----------------------------------------------------/'
31+ echo πππ
32+
33+ exit 1
You canβt perform that action at this time.
0 commit comments