Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
timothe
duniter
Commits
ddb274fd
Commit
ddb274fd
authored
May 14, 2016
by
Cédric Moreau
Browse files
Fix
#421
Debian packaging directly in source code repository
parent
a1ef3226
Changes
6
Hide whitespace changes
Inline
Side-by-side
.travis.yml
View file @
ddb274fd
...
...
@@ -53,8 +53,7 @@ before_deploy:
-
cd ucoin_release
-
tar czf ../duniter-x64.tar.gz * --exclude ".git" --exclude "coverage" --exclude "test"
-
cd ..
-
git clone https://github.com/ucoin-io/debpkg.git duniter-x64
-
rm -Rf duniter-x64/.git
-
mv ucoin_release/sources/ci/travis/debian duniter-x64
-
mkdir -p duniter-x64/opt/duniter/
-
chmod 755 duniter-x64/DEBIAN/post*
-
chmod 755 duniter-x64/DEBIAN/pre*
...
...
ci/arm/make_deb_package.sh
0 → 100644
View file @
ddb274fd
#!/bin/bash
export
GITHUB_TOKEN
=
92472757742be0862c0020197ce7896b66043742
rm
-Rf
ucoin
*
rm
-Rf
duniter
*
git clone https://github.com/duniter/duniter
cd
duniter
echo
"Fetching tags..."
git fetch
--tags
COMMIT
=
`
git rev-list
--tags
--max-count
=
1
`
DUNITER_VER
=
`
echo
$(
git describe
--tags
$COMMIT
)
|
sed
's/^v//'
`
ARCH
=
`
uname
-m
|
sed
"s/86_//"
`
url
=
"https://github.com/duniter/duniter/releases/download/v
${
DUNITER_VER
}
/duniter-v
${
DUNITER_VER
}
-linux-
${
ARCH
}
.deb"
echo
$DUNITER_VER
echo
"Checking if release exists..."
if
curl
--output
/dev/null
--silent
--head
--fail
"
$url
"
;
then
echo
"Artifact already published."
else
echo
"Checkout to last tag..."
echo
">> Release v
$DUNITER_VER
"
git checkout v
$DUNITER_VER
NVER
=
"v5.9.1"
DUNITER_DEB_VER
=
"
$DUNITER_VER
"
echo
"
$ARCH
"
echo
"
$NVER
"
echo
"
$DUNITER_VER
"
echo
"
$DUNITER_DEB_VER
"
wget http://nodejs.org/dist/
${
NVER
}
/node-
${
NVER
}
-linux-
${
ARCH
}
.tar.gz
tar
xzf node-
${
NVER
}
-linux-
${
ARCH
}
.tar.gz
mv
node-
${
NVER
}
-linux-
${
ARCH
}
node
rm
node-
${
NVER
}
-linux-
${
ARCH
}
.tar.gz
node/bin/npm
install
node/bin/npm prune
--production
SRC
=
`
pwd
`
echo
$SRC
cd
..
mkdir
-p
duniter_release
cp
-R
${
SRC
}
/ duniter_release/sources/
mv
duniter_release/sources/node duniter_release
rm
-Rf
duniter_release/sources/ui/package/node_modules
rm
-Rf
duniter_release/sources/ui/package/bower_components
git clone https://github.com/ucoin-io/debpkg.git duniter-
${
ARCH
}
rm
-Rf
duniter-
${
ARCH
}
/.git
mkdir
-p
duniter-
${
ARCH
}
/opt/duniter/
chmod
755 duniter-
${
ARCH
}
/DEBIAN/post
*
chmod
755 duniter-
${
ARCH
}
/DEBIAN/pre
*
sed
-i
"s/Version:.*/Version:
$DUNITER_DEB_VER
/g"
duniter-
${
ARCH
}
/DEBIAN/control
cd
duniter_release/sources
pwd
rm
-Rf
.git
zip
-qr
../duniter-desktop.nw
*
cd
../..
mv
duniter_release/duniter-desktop.nw duniter-
${
ARCH
}
/opt/duniter/
mv
duniter_release/node duniter-
${
ARCH
}
/opt/duniter/
fakeroot dpkg-deb
--build
duniter-
${
ARCH
}
mv
duniter-
${
ARCH
}
.deb duniter-v
${
DUNITER_VER
}
-linux-
${
ARCH
}
.deb
./github-release upload
-u
ucoin-io
-r
ucoin
--tag
v
${
DUNITER_VER
}
--name
duniter-v
${
DUNITER_VER
}
-linux-
${
ARCH
}
.deb
--file
~/dev/duniter-v
${
DUNITER_VER
}
-linux-
${
ARCH
}
.deb
fi
ci/travis/debian/DEBIAN/control
0 → 100644
View file @
ddb274fd
Package: duniter
Version: 0.4
Section: misc
Priority: optional
Architecture: all
Installed-Size: 200000
Maintainer: Cedric Moreau <cem.moreau@gmail.com>
Description: Duniter desktop version
ci/travis/debian/DEBIAN/postinst
0 → 100755
View file @
ddb274fd
#!/bin/bash
DUN_ROOT
=
/opt/duniter
mkdir
$DUN_ROOT
/sources
# Duniter sources
if
[[
-f
$DUN_ROOT
/duniter-desktop.nw
]]
;
then
unzip
-d
$DUN_ROOT
/sources/
$DUN_ROOT
/duniter-desktop.nw
fi
# Duniter-Desktop
if
[[
-f
$DUN_ROOT
/nw.nwb
]]
;
then
unzip
-d
$DUN_ROOT
/nw
$DUN_ROOT
/nw.nwb
cp
-R
$DUN_ROOT
/sources/gui/
*
$DUN_ROOT
/nw/
chmod
+x
$DUN_ROOT
/nw/nw
$DUN_ROOT
/nw/lib
$DUN_ROOT
/nw/locales
ln
-s
$DUN_ROOT
/nw/nw /usr/bin/duniter-desktop
fi
# Duniter CLI executes with embedded node
if
[[
-d
$DUN_ROOT
/node
]]
;
then
chmod
755
$DUN_ROOT
/sources/bin/ucoind
sed
-i
"s/usr
\/
bin
\/
env node/opt
\/
duniter
\/
node
\/
bin
\/
node/g"
$DUN_ROOT
/sources/bin/ucoind
fi
# Else will execute with environment node
ln
-s
$DUN_ROOT
/sources/bin/ucoind /usr/bin/duniter
chmod
+r
-R
$DUN_ROOT
ci/travis/debian/DEBIAN/prerm
0 → 100755
View file @
ddb274fd
#!/bin/bash
rm
/usr/bin/duniter
rm
/usr/bin/duniter-desktop
rm
-Rf
/opt/duniter
ci/travis/debian/usr/share/applications/duniter.desktop
0 → 100644
View file @
ddb274fd
[Desktop Entry]
Name=Duniter Desktop
Exec=duniter-desktop
Icon=/opt/duniter/nw/duniter.png
Type=Application
Categories=Utility
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment