MOBILE-3077 travis: Remove desktop build scripts
parent
9c7dc76730
commit
627ae616b4
|
@ -37,7 +37,7 @@
|
||||||
"postionic:build": "gulp copy-component-templates",
|
"postionic:build": "gulp copy-component-templates",
|
||||||
"desktop.pack": "electron-builder --dir",
|
"desktop.pack": "electron-builder --dir",
|
||||||
"desktop.dist": "electron-builder -p never",
|
"desktop.dist": "electron-builder -p never",
|
||||||
"windows.store": "electron-windows-store --input-directory .\\desktop\\dist\\win-unpacked --output-directory .\\desktop\\store --flatten true -a .\\resources\\desktop -m .\\desktop\\assets\\windows\\AppXManifest.xml --package-version 0.0.0.0 --package-name MoodleDesktop"
|
"windows.store": "electron-windows-store --input-directory .\\desktop\\dist\\win-unpacked --output-directory .\\desktop\\store -a .\\resources\\desktop -m .\\desktop\\assets\\windows\\AppXManifest.xml --package-version 0.0.0.0 --package-name MoodleDesktop"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^5.2.10",
|
"@angular/animations": "^5.2.10",
|
||||||
|
@ -210,7 +210,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"compression": "maximum",
|
"compression": "maximum",
|
||||||
"electronVersion": "4.0.1",
|
"electronVersion": "5.0.4",
|
||||||
"mac": {
|
"mac": {
|
||||||
"category": "public.app-category.education",
|
"category": "public.app-category.education",
|
||||||
"icon": "resources/desktop/icon.icns",
|
"icon": "resources/desktop/icon.icns",
|
||||||
|
|
|
@ -40,17 +40,34 @@ if [ ! -z $GIT_ORG ] && [ ! -z $GIT_TOKEN ] ; then
|
||||||
gitfolder=${PWD##*/}
|
gitfolder=${PWD##*/}
|
||||||
git clone --depth 1 --no-single-branch https://github.com/$GIT_ORG/moodlemobile-phonegapbuild.git ../pgb
|
git clone --depth 1 --no-single-branch https://github.com/$GIT_ORG/moodlemobile-phonegapbuild.git ../pgb
|
||||||
pushd ../pgb
|
pushd ../pgb
|
||||||
|
|
||||||
|
mkdir /tmp/travistemp
|
||||||
|
cp .travis.yml /tmp/travistemp
|
||||||
|
mkdir /tmp/travistemp/scripts
|
||||||
|
cp scripts/* /tmp/travistemp/scripts
|
||||||
|
|
||||||
git checkout $TRAVIS_BRANCH
|
git checkout $TRAVIS_BRANCH
|
||||||
rm -Rf assets build index.html templates
|
|
||||||
cp -Rf ../$gitfolder/www/* ./
|
rm -Rf assets build index.html templates www destkop
|
||||||
rm -Rf assets/countries assets/mimetypes
|
|
||||||
|
if [ $TRAVIS_BRANCH == 'desktop' ] ; then
|
||||||
|
cp -Rf ../$gitfolder/desktop ./
|
||||||
|
cp -Rf ../$gitfolder/package.json ./
|
||||||
|
cp -Rf ../$gitfolder/www ./
|
||||||
|
rm -Rf www/assets/countries www/assets/mimetypes
|
||||||
|
else
|
||||||
|
cp -Rf ../$gitfolder/www/* ./
|
||||||
|
rm -Rf assets/countries assets/mimetypes
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp /tmp/travistemp/.travis.yml .travis.yml
|
||||||
|
mkdir scripts
|
||||||
|
cp /tmp/travistemp/scripts/* scripts
|
||||||
|
|
||||||
|
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Travis build: $TRAVIS_BUILD_NUMBER"
|
git commit -m "Travis build: $TRAVIS_BUILD_NUMBER"
|
||||||
git push https://$GIT_TOKEN@github.com/$GIT_ORG/moodlemobile-phonegapbuild.git
|
git push https://$GIT_TOKEN@github.com/$GIT_ORG/moodlemobile-phonegapbuild.git
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z $GIT_ORG_PRIVATE ] && [ ! -z $GIT_TOKEN ] && [ $TRAVIS_BRANCH == 'desktop' ] && [ $TRAVIS_OS_NAME == 'linux' ]; then
|
|
||||||
./scripts/linux.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Script for generating the Desktop builds
|
|
||||||
#
|
|
||||||
|
|
||||||
sudo apt-get install -y libnss3-dev
|
|
||||||
|
|
||||||
npm install -g electron-builder electron
|
|
||||||
|
|
||||||
electron-builder install-app-deps
|
|
||||||
|
|
||||||
jq -s '.[0] + {"name": "moodledesktop"}' package.json > package_new.json
|
|
||||||
mv package_new.json package.json
|
|
||||||
|
|
||||||
rm -Rf desktop/dist
|
|
||||||
|
|
||||||
npm run desktop.dist -- -l --x64 --ia32
|
|
||||||
|
|
||||||
if [ ! -z $GIT_ORG_PRIVATE ] && [ ! -z $GIT_TOKEN ] ; then
|
|
||||||
git clone -q https://$GIT_TOKEN@github.com/moodlemobile/bma-apps-builds.git ../apps
|
|
||||||
|
|
||||||
mv desktop/dist/*.AppImage ../apps
|
|
||||||
|
|
||||||
cd ../apps
|
|
||||||
|
|
||||||
chmod +x *.AppImage
|
|
||||||
mv *i386.AppImage linux-ia32.AppImage
|
|
||||||
mv Moodle*.AppImage linux-x64.AppImage
|
|
||||||
ls
|
|
||||||
|
|
||||||
tar -czvf MoodleDesktop32.tar.gz linux-ia32.AppImage
|
|
||||||
tar -czvf MoodleDesktop64.tar.gz linux-x64.AppImage
|
|
||||||
rm *.AppImage
|
|
||||||
|
|
||||||
git add .
|
|
||||||
git commit -m "Linux desktop versions from Travis build $TRAVIS_BUILD_NUMBER"
|
|
||||||
git push
|
|
||||||
fi
|
|
Loading…
Reference in New Issue