forked from ElementsProject/elements
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from commerceblock/dpkg_build_update
Fix debian builds
- Loading branch information
Showing
2 changed files
with
23 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
FROM commerceblock/debbase:latest | ||
|
||
ARG token | ||
ENV GITHUB_RELEASE_ACCESS_TOKEN=$token | ||
ARG repository | ||
ENV GITHUB_RELEASE_REPOSITORY=$repository | ||
ARG commit | ||
ENV GITHUB_RELEASE_COMMIT=$commit | ||
ARG tag | ||
ENV GITHUB_RELEASE_TAG=$tag | ||
|
||
RUN set -ex \ | ||
&& apt install -y jq \ | ||
&& export repo="repos/commerceblock/ocean/releases" \ | ||
&& export release_url="https://api.github.com/${repo}/latest" \ | ||
&& export id=$(curl -sH "Authorization: token ${token}" ${release_url} | jq .id) \ | ||
&& export tag_name=$(curl -sH "Authorization: token ${token}" ${release_url} | jq -r .tag_name) \ | ||
&& export upload_url="https://uploads.github.com/${repo}/${id}/assets?name=ocean-${tag_name}.deb" \ | ||
&& cd ocean \ | ||
&& git pull \ | ||
&& export gittag=$(git describe --tags --match '[0-9].[0-9].[0-9]*') \ | ||
&& export GITHUB_RELEASE_TAG=$gittag \ | ||
&& git checkout $gittag \ | ||
&& git checkout ${tag_name} \ | ||
&& ./autogen.sh \ | ||
&& ./configure --enable-glibc-back-compat \ | ||
--prefix=`pwd`/depends/x86_64-pc-linux-gnu \ | ||
LDFLAGS="-static-libstdc++" \ | ||
&& make \ | ||
&& mkdir -p ocean-$gittag/usr/local/bin \ | ||
&& cp src/oceand ocean-$gittag/usr/local/bin/ \ | ||
&& cp src/ocean-cli ocean-$gittag/usr/local/bin/ \ | ||
&& cp src/ocean-tx ocean-$gittag/usr/local/bin/ \ | ||
&& mkdir -p ocean-$gittag/DEBIAN \ | ||
&& make -j$(nproc) \ | ||
&& mkdir -p ocean-${tag_name}/usr/local/bin \ | ||
&& cp src/oceand ocean-${tag_name}/usr/local/bin/ \ | ||
&& cp src/ocean-cli ocean-${tag_name}/usr/local/bin/ \ | ||
&& cp src/ocean-tx ocean-${tag_name}/usr/local/bin/ \ | ||
&& mkdir -p ocean-${tag_name}/DEBIAN \ | ||
&& cp contrib/docker/dpkg-build/control \ | ||
ocean-$gittag/DEBIAN/ \ | ||
&& sed -i "s/Version: .*/Version: $gittag/" \ | ||
ocean-$gittag/DEBIAN/control \ | ||
&& dpkg-deb --build ocean-$gittag \ | ||
&& go run github-release/main.go "Debian package" \ | ||
ocean-$gittag.deb | ||
ocean-${tag_name}/DEBIAN/ \ | ||
&& sed -i "s/Version: .*/Version: ${tag_name}/" \ | ||
ocean-${tag_name}/DEBIAN/control \ | ||
&& dpkg-deb --build ocean-${tag_name} \ | ||
&& curl -v -d @ocean-${tag_name}.deb \ | ||
-H "Content-Type: multipart/form-data" \ | ||
-H "Authorization: token $(echo $token)" \ | ||
-H "Content-Type: application/octet-stream" \ | ||
${upload_url} |
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 |
---|---|---|
|
@@ -4,5 +4,5 @@ Section: base | |
Priority: optional | ||
Architecture: amd64 | ||
Depends: libc6 (>= 2.27) | ||
Maintainer: Martin Tsvetanov <[email protected]> | ||
Maintainer: CommerceBlock | ||
Description: oceand ocean-cli and ocean-tx binaries |