Skip to content
Snippets Groups Projects
Commit bffadce1 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] #689 Allow to make a general build locally

parent 96e1434a
No related branches found
No related tags found
No related merge requests found
...@@ -3,22 +3,10 @@ ...@@ -3,22 +3,10 @@
TAG="v$1" TAG="v$1"
TOKEN=`cat $HOME/.config/duniter/.github` TOKEN=`cat $HOME/.config/duniter/.github`
ARCH=`uname -m` ARCH=`uname -m`
ASSETS=
# Check that the tag exists remotely # Check that the tag exists remotely
if [[ -z $TAG ]]; then if [[ ! -z $1 ]]; then
echo "Wrong call to the command, syntax is:"
echo ""
echo " new_prerelease.sh <tag>"
echo ""
echo "Examples:"
echo ""
echo " new_prerelease.sh 1.2.3"
echo " new_prerelease.sh 1.4.0"
echo " new_prerelease.sh 1.4.1"
echo ""
exit 1
fi
echo "Checking that $TAG has been pushed to 'origin'..." echo "Checking that $TAG has been pushed to 'origin'..."
REMOTE_TAG=`git ls-remote --tags origin | grep -Fo "$TAG"` REMOTE_TAG=`git ls-remote --tags origin | grep -Fo "$TAG"`
...@@ -32,6 +20,8 @@ echo "Remote tag: $REMOTE_TAG" ...@@ -32,6 +20,8 @@ echo "Remote tag: $REMOTE_TAG"
echo "Creating the pre-release..." echo "Creating the pre-release..."
ASSETS=`node ./release/scripts/create-release.js $TOKEN $TAG create` ASSETS=`node ./release/scripts/create-release.js $TOKEN $TAG create`
fi
EXPECTED_ASSETS="duniter-desktop-$TAG-linux-x64.deb EXPECTED_ASSETS="duniter-desktop-$TAG-linux-x64.deb
duniter-desktop-$TAG-linux-x64.tar.gz duniter-desktop-$TAG-linux-x64.tar.gz
duniter-server-$TAG-linux-x64.deb duniter-server-$TAG-linux-x64.deb
...@@ -47,8 +37,10 @@ for asset in $EXPECTED_ASSETS; do ...@@ -47,8 +37,10 @@ for asset in $EXPECTED_ASSETS; do
if [[ $ARCH == "x86_64" ]]; then if [[ $ARCH == "x86_64" ]]; then
echo "Starting Debian build..." echo "Starting Debian build..."
./release/scripts/build.sh make deb $TAG ./release/scripts/build.sh make deb $TAG
if [[ ! -z $1 ]]; then
DEB_PATH="$PWD/release/arch/debian/$asset" DEB_PATH="$PWD/release/arch/debian/$asset"
node ./release/scripts/upload-release.js $TOKEN $TAG $DEB_PATH node ./release/scripts/upload-release.js $TOKEN $TAG $DEB_PATH
fi
else else
echo "This computer cannot build this asset, required architecture is 'x86_64'. Skipping." echo "This computer cannot build this asset, required architecture is 'x86_64'. Skipping."
fi fi
...@@ -59,8 +51,10 @@ for asset in $EXPECTED_ASSETS; do ...@@ -59,8 +51,10 @@ for asset in $EXPECTED_ASSETS; do
if [[ $ARCH == "x86_64" ]]; then if [[ $ARCH == "x86_64" ]]; then
echo "Starting Windows build..." echo "Starting Windows build..."
./release/scripts/build.sh make win $TAG ./release/scripts/build.sh make win $TAG
if [[ ! -z $1 ]]; then
WIN_PATH="$PWD/release/arch/windows/$asset" WIN_PATH="$PWD/release/arch/windows/$asset"
node ./release/scripts/upload-release.js $TOKEN $TAG $WIN_PATH node ./release/scripts/upload-release.js $TOKEN $TAG $WIN_PATH
fi
else else
echo "This computer cannot build this asset, required architecture is 'x86_64'. Skipping." echo "This computer cannot build this asset, required architecture is 'x86_64'. Skipping."
fi fi
...@@ -71,8 +65,10 @@ for asset in $EXPECTED_ASSETS; do ...@@ -71,8 +65,10 @@ for asset in $EXPECTED_ASSETS; do
if [[ $ARCH == "armv7l" ]]; then if [[ $ARCH == "armv7l" ]]; then
echo "Starting ARM build..." echo "Starting ARM build..."
./release/scripts/build.sh make arm $TAG ./release/scripts/build.sh make arm $TAG
if [[ ! -z $1 ]]; then
ARM_PATH="$PWD/release/arch/arm/$asset" ARM_PATH="$PWD/release/arch/arm/$asset"
node ./release/scripts/upload-release.js $TOKEN $TAG $ARM_PATH node ./release/scripts/upload-release.js $TOKEN $TAG $ARM_PATH
fi
else else
echo "This computer cannot build this asset, required architecture is 'armv7l'. Skipping." echo "This computer cannot build this asset, required architecture is 'armv7l'. Skipping."
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment