Skip to content

Commit

Permalink
Create local release
Browse files Browse the repository at this point in the history
  • Loading branch information
rllola committed Feb 6, 2020
1 parent 0227db7 commit ba1d0a7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
11 changes: 9 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 5 additions & 3 deletions scripts/generate_deb_files.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit ba1d0a7

Please sign in to comment.