Skip to content

Commit

Permalink
AVRO-3865, AVRO-3866: [Build][Perl][Python] Refer to share/VERSION.tx…
Browse files Browse the repository at this point in the history
…t rather than copy it (#2508)
  • Loading branch information
sarutak authored Sep 22, 2023
1 parent 76c2ca6 commit 032d5ac
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion lang/perl/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ META.yml
LICENSE
NOTICE
README
VERSION.txt
t/00_compile.t
t/01_names.t
t/01_schema.t
Expand Down
7 changes: 1 addition & 6 deletions lang/perl/Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ use Config;
use inc::Module::Install;

my $version;
for ('VERSION.txt', '../../share/VERSION.txt') {
if (-f) {
$version = `cat $_`;
last;
}
}
$version = `cat ../../share/VERSION.txt`;
chomp $version;

license 'apache';
Expand Down
1 change: 0 additions & 1 deletion lang/perl/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ case "$target" in
;;

dist)
cp ../../share/VERSION.txt .
perl ./Makefile.PL && make dist
;;

Expand Down
5 changes: 2 additions & 3 deletions lang/py/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ clean() {
'*.avsc' \
'*.egg-info' \
'*.py[co]' \
'VERSION.txt' \
'__pycache__' \
'.tox' \
'avro/test/interop' \
Expand All @@ -53,8 +52,8 @@ dist() (

doc() {
local doc_dir
[[ -s VERSION.txt ]] || cp ../../share/VERSION.txt .
doc_dir="../../build/avro-doc-$(<VERSION.txt)/api/py"
local version=$(cat ../../share/VERSION.txt)
doc_dir="../../build/avro-doc-$version/api/py"
python3 -m tox -e docs
mkdir -p "$doc_dir"
cp -a docs/build/* "$doc_dir"
Expand Down

0 comments on commit 032d5ac

Please sign in to comment.