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