-
-
Notifications
You must be signed in to change notification settings - Fork 59
/
make_release.fish
executable file
·38 lines (29 loc) · 1.3 KB
/
make_release.fish
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env fish
set blender_addons_repo $HOME/Repositories/applications/blender-addons/
set out_path power_sequencer
function make_release
rm -v $out_path.zip
mkdir -v $out_path
echo "Copying all files and directories to $out_path."
cp -r (string match -v $out_path -- *) $out_path
echo "Deleting development files from the release copy."
cd $out_path
# Enumerate files for wildcards without matches
for i in **__pycache__ *.fish img/ **LICENSE **MANIFEST.in **Makefile **pyproject.toml **.md scripts/ShortcutsDocs
rm -r $i
end
cd ..
echo "Compressing the release directory to a zip archive for the GitHub release."
zip --quiet $out_path.zip $out_path/**
echo "Making the blender version."
sed -i s/blender_power_sequencer/power_sequencer/ $out_path/tools/__init__.py $out_path/operators/__init__.py
echo "Copying the files to the Blender Addons repository."
echo "Removing $blender_addons_repo/$out_path."
rm -r $blender_addons_repo/$out_path
echo "Copying $out_path to $blender_addons_repo."
cp -r $out_path $blender_addons_repo
echo "Deleting the build directory $out_path."
rm -rf $out_path
echo "Done. Build with Blender, run `make update && make test`, and test in a development build before pushing."
end
make_release