diff --git a/README.md b/README.md index 016656d..3bd3c72 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,12 @@ sudo apt install libffi-dev ``` ---- + +### Release + +It takes too long to build in CI. Instead builds are being done locally on my computer (maybe for the best). +``` +make release TAG=v0.x.x +``` + +Using semver standard. diff --git a/makefile b/makefile index 374acb9..26f431e 100644 --- a/makefile +++ b/makefile @@ -1,16 +1,23 @@ build: python build.py --no-sysroot - mkdir pkg-debian/usr/share/AirbnbScanner + mkdir -p pkg-debian/usr/share/AirbnbScanner cp build-linux-64/AirbnbScanner pkg-debian/usr/share/AirbnbScanner/AirbnbScanner dpkg -b pkg-debian AirbnbScanner_test_i386.deb +release: + python build.py --no-sysroot + ./scripts/generate_deb_files.sh $(TAG) + mkdir -p pkg-debian/usr/share/AirbnbScanner + cp build-linux-64/AirbnbScanner pkg-debian/usr/share/AirbnbScanner/AirbnbScanner + dpkg -b pkg-debian AirbnbScanner_$(TAG)_i386.deb + clean: rm -rf build-*/ rm -rf pkg-debian/usr/share/AirbnbScanner rm *.deb install: - sudo dpkg -i AirbnbScanner_test_i386.deb + sudo dpkg -i AirbnbScanner_$(TAG)_i386.deb uninstall: sudo dpkg -r airbnbscanner diff --git a/scripts/generate_deb_files.sh b/scripts/generate_deb_files.sh index 388facc..e925a9c 100755 --- a/scripts/generate_deb_files.sh +++ b/scripts/generate_deb_files.sh @@ -1,9 +1,11 @@ #!/bin/bash +TAG=$1 + echo "====== GENERATE CONTROL FILE ======" cat > $PWD/pkg-debian/DEBIAN/control << EOF Package: AirbnbScanner -Version: ${TRAVIS_TAG/v} +Version: ${TAG/v} Architecture: all Essential: no Section: utils @@ -17,13 +19,13 @@ mkdir -p $PWD/pkg-debian/usr/share/applications/ echo "====== GENERATE .DESKTOP FILE ======" cat > $PWD/pkg-debian/usr/share/applications/airbnb-scanner.desktop << EOF [Desktop Entry] -Version=${TRAVIS_TAG/v} +Version=${TAG/v} Name=Airbnb Scanner Comment=Device scanner to get the camera in your Airbnb. Exec=AirbnbScanner %u Path=/usr/share/AirbnbScanner/ Icon=airbnbscanner -Terminal=true +Terminal=talse Type=Application Categories=Application;Network; EOF