mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
refactored upload process
This commit is contained in:
parent
cd88751cf3
commit
41e8218f65
41
buildScripts/buildInstallLocally
Executable file
41
buildScripts/buildInstallLocally
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This bash script builds the complete pdf2htmlEX application LOCALLY
|
||||||
|
# (It does not create the AppImage or Docker images)
|
||||||
|
|
||||||
|
# Adjust the following two environment variables to suit your needs
|
||||||
|
#
|
||||||
|
export UNATTENDED="--assume-yes"
|
||||||
|
export MAKE_PARALLEL="-j $(nproc)"
|
||||||
|
|
||||||
|
# choose one of the following...
|
||||||
|
#
|
||||||
|
export PDF2HTMLEX_BRANCH=newBuildSystem
|
||||||
|
# export PDF2HTMLEX_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
|
||||||
|
################
|
||||||
|
# do the build
|
||||||
|
|
||||||
|
./buildScripts/versionEnvs || { echo 'versionEnvs FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
|
./buildScripts/reportEnvs || { echo 'reportEnvs FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
|
./buildScripts/getBuildTools || { echo 'getBuildTools FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
|
./buildScripts/getDevLibraries || { echo 'getDevLibraries FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
|
./buildScripts/getPoppler || { echo 'getPoppler FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
|
./buildScripts/buildPoppler || { echo 'buildPoppler FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
|
./buildScripts/installPoppler || { echo 'installPoppler FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
|
./buildScripts/getFontforge || { echo 'getFontforge FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
|
./buildScripts/buildFontforge || { echo 'buildFontforge FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
|
./buildScripts/installFontforge || { echo 'installFontforge FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
|
./buildScripts/buildPdf2htmlEX || { echo 'buildPdf2htmlEX FAILED' ; exit 1 ; }
|
||||||
|
|
||||||
|
./buildScripts/installPdf2htmlEX || { echo 'installPdf2htmlEX FAILED' ; exit 1 ; }
|
@ -7,7 +7,6 @@
|
|||||||
#
|
#
|
||||||
export UNATTENDED="--assume-yes"
|
export UNATTENDED="--assume-yes"
|
||||||
export MAKE_PARALLEL="-j $(nproc)"
|
export MAKE_PARALLEL="-j $(nproc)"
|
||||||
export TRAVIS_REPO_SLUG=stephengaito/pdf2htmlEX
|
|
||||||
|
|
||||||
# choose one of the following...
|
# choose one of the following...
|
||||||
#
|
#
|
@ -16,39 +16,73 @@ source ./buildScripts/reSourceVersionEnvs
|
|||||||
# upload github release artefacts
|
# upload github release artefacts
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# begin by gathering the required environment variables
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ -z "$GITHUB_USERNAME" ]; then
|
||||||
|
echo ""
|
||||||
|
read -p "Enter the GitHub upload username: " GITHUB_USERNAME
|
||||||
|
echo ""
|
||||||
|
if [ -z "$GITHUB_USERNAME" ]; then
|
||||||
|
echo "GITHUB_USERNAME not set... so we can not upload release artefacts."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$GITHUB_TOKEN" ]; then
|
||||||
|
echo ""
|
||||||
|
read -p "Enter the GitHub upload token/password: " GITHUB_TOKEN
|
||||||
|
echo ""
|
||||||
|
if [ -z "$GITHUB_TOKEN" ]; then
|
||||||
|
echo "GITHUB_TOKEN not set... so we can not upload release artefacts."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$TRAVIS_REPO_SLUG" ]; then
|
||||||
|
echo ""
|
||||||
|
read -p "Enter the GitHub repository (user/proj): " TRAVIS_REPO_SLUG
|
||||||
|
echo ""
|
||||||
|
if [ -z "$TRAVIS_REPO_SLUG" ]; then
|
||||||
|
echo "TRAVIS_REPO_SLUG (Github repository) not set... so we can not upload release artefacts."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
cd imageBuild
|
cd imageBuild
|
||||||
|
|
||||||
if [ -n "$GITHUB_TOKEN" ]; then
|
echo "machine api.github.com" > $HOME/.netrc
|
||||||
|
echo " login $GITHUB_USERNAME" >> $HOME/.netrc
|
||||||
|
echo " password $GITHUB_TOKEN" >> $HOME/.netrc
|
||||||
|
echo "machine uploads.github.com" >> $HOME/.netrc
|
||||||
|
echo " login $GITHUB_USERNAME" >> $HOME/.netrc
|
||||||
|
echo " password $GITHUB_TOKEN" >> $HOME/.netrc
|
||||||
|
|
||||||
echo "machine api.github.com" > $HOME/.netrc
|
echo $BUILD_TIME > buildTime
|
||||||
echo " login $GITHUB_USERNAME" >> $HOME/.netrc
|
echo $APPIMAGE_NAME > appImageName
|
||||||
echo " password $GITHUB_TOKEN" >> $HOME/.netrc
|
echo $DOCKER_NAME > dockerImageName
|
||||||
echo "machine uploads.github.com" >> $HOME/.netrc
|
|
||||||
echo " login $GITHUB_USERNAME" >> $HOME/.netrc
|
|
||||||
echo " password $GITHUB_TOKEN" >> $HOME/.netrc
|
|
||||||
|
|
||||||
echo $BUILD_TIME > buildTime
|
echo ../buildScripts/uploadReleaseTool "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \
|
||||||
|
|
||||||
echo $APPIMAGE_NAME > appImageName
|
|
||||||
|
|
||||||
echo $DOCKER_NAME > dockerImageName
|
|
||||||
|
|
||||||
echo ../buildScripts/uploadReleaseTool "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \
|
|
||||||
-- $APPIMAGE_NAME appImageName dockerImageName buildTime
|
-- $APPIMAGE_NAME appImageName dockerImageName buildTime
|
||||||
|
|
||||||
../buildScripts/uploadReleaseTool "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \
|
../buildScripts/uploadReleaseTool "$TRAVIS_REPO_SLUG" "continuous" "Latest release" \
|
||||||
-- $APPIMAGE_NAME appImageName dockerImageName buildTime
|
-- $APPIMAGE_NAME appImageName dockerImageName buildTime
|
||||||
|
|
||||||
else
|
|
||||||
echo "GITHUB_TOKEN not set... so we can not upload release artefacts."
|
|
||||||
fi
|
|
||||||
|
|
||||||
##################################
|
##################################
|
||||||
# push docker image
|
# push docker image
|
||||||
#
|
#
|
||||||
if [ -x "$(which docker)" ]; then
|
if [ -x "$(which docker)" ]; then
|
||||||
|
|
||||||
if [ -n "$DOCKER_USERNAME" ]; then
|
if [ -z "$DOCKER_USERNAME" ]; then
|
||||||
|
echo ""
|
||||||
|
read -p "Enter the Docker usernane): " DOCKER_USERNAME
|
||||||
|
echo ""
|
||||||
|
if [ -z "$DOCKER_USERNAME" ]; then
|
||||||
|
echo "DOCKER_USERNAME not set... so we do not know where to push image."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$DOCKER_PASSWORD" ]; then
|
if [ -z "$DOCKER_PASSWORD" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
@ -60,10 +94,6 @@ if [ -x "$(which docker)" ]; then
|
|||||||
|
|
||||||
docker push $DOCKER_USERNAME/pdf2htmlex
|
docker push $DOCKER_USERNAME/pdf2htmlex
|
||||||
|
|
||||||
else
|
|
||||||
echo "DOCKER_USERNAME not set... so we do not know where to push image."
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Docker is not installed... skipping upload of docker image."
|
echo "Docker is not installed... skipping upload of docker image."
|
||||||
fi
|
fi
|
||||||
|
@ -31,5 +31,4 @@ echo "export BUILD_TIME=\"$BUILD_TIME\"" >> buildScripts/reSourceV
|
|||||||
echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> buildScripts/reSourceVersionEnvs
|
echo "export DOCKER_FROM=\"$DOCKER_FROM\"" >> buildScripts/reSourceVersionEnvs
|
||||||
echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> buildScripts/reSourceVersionEnvs
|
echo "export DOCKER_NAME=\"$DOCKER_NAME\"" >> buildScripts/reSourceVersionEnvs
|
||||||
echo "export APPIMAGE_NAME=\"$APPIMAGE_NAME\"" >> buildScripts/reSourceVersionEnvs
|
echo "export APPIMAGE_NAME=\"$APPIMAGE_NAME\"" >> buildScripts/reSourceVersionEnvs
|
||||||
echo "export TRAVIS_REPO_SLUG=\"$TRAVIS_REPO_SLUG\"" >> buildScripts/reSourceVersionEnvs
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user