forked from indigo-astronomy/indigo_imager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
27 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,9 +25,11 @@ LABEL maintainer="[email protected]" | |
RUN apt-get -y update && apt-get -y install wget unzip build-essential autoconf autotools-dev libtool cmake libudev-dev libavahi-compat-libdnssd-dev libusb-1.0-0-dev fxload libcurl4-gnutls-dev libgphoto2-dev libz-dev git curl bsdmainutils qt5-default devscripts cdbs apt-transport-https | ||
RUN echo 'deb [trusted=yes] https://indigo-astronomy.github.io/indigo_ppa/ppa indigo main' >>/etc/apt/sources.list | ||
RUN apt-get update | ||
RUN apt-get install indigo | ||
RUN git clone https://github.com/indigo-astronomy/indigo_imager.git | ||
WORKDIR indigo_imager | ||
RUN apt-get -y install indigo | ||
COPY ain-imager-$2.tar.gz . | ||
RUN tar -zxf ain-imager-$2.tar.gz | ||
RUN rm ain-imager-$2.tar.gz | ||
WORKDIR ain-imager-$2 | ||
RUN qmake | ||
RUN scripts/builddeb.sh $2 | ||
EOF | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/bin/sh | ||
|
||
GIT_VERSION="" | ||
DEB_VERSION="" | ||
VERSION=${1} | ||
|
||
DEBFULLNAME="Rumen Bogdanovski" | ||
EMAIL="[email protected]" | ||
|
@@ -21,34 +20,17 @@ rm -f debian/changelog | |
[ ! $(which dpkg-buildpackage) ] && { echo "executable 'dpkg-buildpackage' not found install package: 'dpkg-dev'"; exit 1; } | ||
[ ! $(which cdbs-edit-patch) ] && { echo "executable 'cdbs' not found install package: 'cdbs'"; exit 1; } | ||
|
||
# Read GIT TAG version via command git describe | ||
GIT_VERSION=$(git describe --tags) | ||
[ $? -ne 0 ] && { echo "GIT tag version cannot be read"; exit 1; } | ||
|
||
# If parameter is provided, try this tag to checkout and build package. | ||
[ "$#" -eq 1 ] && GIT_VERSION=${1} | ||
|
||
# Get current branch | ||
CURRENT_BRANCH=$(git branch | grep \* | cut -d ' ' -f2); | ||
|
||
# Checkout the desired tag/version we want to build packages. | ||
git checkout ${GIT_VERSION} >/dev/null 2>&1 | ||
[ $? -ne 0 ] && { echo "version '${1}' does not exists in git"; exit 1; } | ||
|
||
# Build dependencies | ||
./build_libs.sh | ||
|
||
# Create entry in debian/changelog. | ||
dch --create --package "ain-imager" --newversion ${GIT_VERSION} --distribution unstable --nomultimaint -t "Build from official upstream." | ||
dch --create --package "ain-imager" --newversion ${VERSION} --distribution unstable --nomultimaint -t "Build from official upstream." | ||
|
||
# Update version.h. | ||
sed -i "s/\(AIN_VERSION \).*/\1\"${GIT_VERSION}\"/g" version.h | ||
sed -i "s/\(AIN_VERSION \).*/\1\"${VERSION}\"/g" version.h | ||
|
||
# Finally build the package. | ||
dpkg-buildpackage \-us \-uc \-I.git \-I\*.out[0-9]\* \-I\*.swp | ||
|
||
# Cleanup debian/changelog. | ||
rm -f debian/changelog | ||
|
||
# Return to current branch | ||
git checkout $CURRENT_BRANCH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
if [ -z $1 ] | ||
then | ||
echo "Please specify git tag" | ||
exit 1 | ||
fi | ||
|
||
if [ -z `git tag | grep -w $1` ] | ||
then | ||
echo "Specified tag not found, building tarball from HEAD" | ||
git archive --format=tar --prefix=ain-imager-$1/ HEAD | gzip >ain-imager-$1.tar.gz | ||
exit 0 | ||
fi | ||
|
||
echo "Building tarball from tag $1" | ||
git archive --format=tar --prefix=ain-imager-$1/ $1 | gzip >ain-imager-$1.tar.gz |