mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
Rename builds with version in Travis
This commit is contained in:
parent
9a73e49796
commit
e3bc744024
10
.travis.yml
10
.travis.yml
@ -69,6 +69,7 @@ script:
|
||||
fi
|
||||
|
||||
after_success:
|
||||
- export CUTTER_VERSION=$(python ../scripts/get_version.py)
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
cp ../src/macos/Cutter.sh Cutter.app/Contents/MacOS/Cutter.sh && chmod +x Cutter.app/Contents/MacOS/Cutter.sh &&
|
||||
macdeployqt Cutter.app -executable=Cutter.app/Contents/MacOS/Cutter &&
|
||||
@ -76,8 +77,9 @@ after_success:
|
||||
mkdir -p Cutter.app/Contents/Resources/r2/share &&
|
||||
cp -a /usr/local/share/radare2 Cutter.app/Contents/Resources/r2/share/ &&
|
||||
mkdir image && cp -a Cutter.app image/ &&
|
||||
hdiutil create -srcfolder image -volname Cutter -fs HFS+ Cutter.dmg &&
|
||||
export FILE_TO_UPLOAD="Cutter.dmg"
|
||||
export DMG_FILE="Cutter-v$CUTTER_VERSION.dmg" &&
|
||||
hdiutil create -srcfolder image -volname Cutter -fs HFS+ "$DMG_FILE" &&
|
||||
export FILE_TO_UPLOAD="$DMG_FILE"
|
||||
; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||
make INSTALL_ROOT=appdir install &&
|
||||
@ -89,7 +91,9 @@ after_success:
|
||||
LD_LIBRARY_PATH=$CUSTOM_PYTHON_PREFIX/lib ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -no-strip -exclude-libs=libnss3.so,libnssutil3.so -ignore-glob=usr/lib/python3.6/** -verbose=2 &&
|
||||
LD_LIBRARY_PATH=$CUSTOM_PYTHON_PREFIX/lib ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage -no-strip -exclude-libs=libnss3.so,libnssutil3.so -ignore-glob=usr/lib/python3.6/** -verbose=2 &&
|
||||
find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq &&
|
||||
export FILE_TO_UPLOAD="Cutter-x86_64.AppImage"
|
||||
export APPIMAGE_FILE="Cutter-v$CUTTER_VERSION-x86_64.AppImage" &&
|
||||
mv Cutter-x86_64.AppImage "$APPIMAGE_FILE" &&
|
||||
export FILE_TO_UPLOAD="$APPIMAGE_FILE"
|
||||
; fi
|
||||
|
||||
deploy:
|
||||
|
23
scripts/get_version.py
Normal file
23
scripts/get_version.py
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
scripts_path = os.path.dirname(os.path.realpath(__file__))
|
||||
pro_file_path = os.path.join(scripts_path, "..", "src", "Cutter.pro")
|
||||
|
||||
with open(pro_file_path, "r") as f:
|
||||
pro_content = f.read()
|
||||
|
||||
def version_var_re(name):
|
||||
return "^[ \t]*{}[ \t]*=[ \t]*(\d)+[ \t]*$".format(name)
|
||||
|
||||
m = re.search(version_var_re("CUTTER_VERSION_MAJOR"), pro_content, flags=re.MULTILINE)
|
||||
version_major = int(m.group(1)) if m is not None else 0
|
||||
|
||||
m = re.search(version_var_re("CUTTER_VERSION_MINOR"), pro_content, flags=re.MULTILINE)
|
||||
version_minor = int(m.group(1)) if m is not None else 0
|
||||
|
||||
m = re.search(version_var_re("CUTTER_VERSION_PATCH"), pro_content, flags=re.MULTILINE)
|
||||
version_patch = int(m.group(1)) if m is not None else 0
|
||||
|
||||
print("{}.{}.{}".format(version_major, version_minor, version_patch))
|
Loading…
Reference in New Issue
Block a user