ci(circleci): add circleci script

parent 1620b544
# Circleci configuration
This is a circleci file configuration with version 2.0 with Android configuration and is created with a workflows to create a parallel runs for test and deploy task
Add this this environment variables on project settings on circleci.com:
- ALIAS
- BUILD_TOOL
- ENCRYPTED_KEY
- GH_EMAIL
- GH_TOKEN
- GH_USER
- KEYSTORE
- TELEGRAM_WEBHOOKS
- TRANSIFEX_API_TOKEN
- TRANSIFEX_USER
#### Jobs:
A run is comprised of one or more named jobs. Jobs are specified in the jobs map, The name of the job is the key in the map, and the value is a map describing the job.
#### build:
Each job consists of the job’s name as a key and a map as a value. A name should be unique within a current jobs
#### steps:
A list of steps to be performed
#### More information:
- https://circleci.com/docs/2.0/language-android
- https://circleci.com/docs/2.0/
version: 2
jobs:
build:
working_directory: ~/flyve_mdm
docker:
# Android the primary container
- image: circleci/android:api-26-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "glpi/build.gradle" }}
- run:
name: Build
command: ./gradlew build
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "glpi/build.gradle" }}
test_api_v25:
working_directory: ~/flyve_mdm
docker:
- image: circleci/android:api-26-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- run:
name: Setup emulator
command: sdkmanager "system-images;android-25;google_apis;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-25;google_apis;armeabi-v7a"
- run:
name: Launch emulator
command: export LD_LIBRARY_PATH=${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib && emulator64-arm -avd test -noaudio -no-boot-anim -no-window -accel on
background: true
- run:
name: Wait emulator
command: |
# wait for it to have booted
circle-android wait-for-boot
# unlock the emulator screen
sleep 30
adb shell input keyevent 82
- run:
name: Run Tests
command: ./gradlew connectedAndroidTest
- store_artifacts:
path: glpi/build/reports
destination: reports
- store_test_results:
path: glpi/build/test-results
test_api_v16:
working_directory: ~/flyve_mdm
docker:
- image: circleci/android:api-26-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- run:
name: Setup emulator
command: sdkmanager "system-images;android-16;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-16;default;armeabi-v7a"
- run:
name: Launch emulator
command: export LD_LIBRARY_PATH=${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib && emulator64-arm -avd test -noaudio -no-boot-anim -no-window -accel on
background: true
- run:
name: Wait emulator
command: |
# wait for it to have booted
circle-android wait-for-boot
# unlock the emulator screen
sleep 30
adb shell input keyevent 82
- run:
name: Run Tests
command: ./gradlew connectedAndroidTest
- store_artifacts:
path: glpi/build/reports
destination: reports
- store_test_results:
path: glpi/build/test-results
deploy_production:
working_directory: ~/flyve_mdm
docker:
# Android the primary container
- image: circleci/android:api-26-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "glpi/build.gradle" }}
- run:
name: Validate
command: source ci/scripts/ci_validate_workflow.sh
- run:
name: Setup environment
command: source ci/scripts/ci_setup.sh
- run:
name: Update version and code
command: source ci/scripts/ci_updateversion.sh
- run:
name: Push changes to github
command: source ci/scripts/ci_push_changes.sh
- run:
name: Create a github release
command: source ci/scripts/ci_github_release.sh
- run:
name: Deploy to Bintray
command: source ci/scripts/ci_bintray.sh
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "glpi/build.gradle" }}
documentation:
working_directory: ~/flyve_mdm
docker:
# Android the primary container
- image: circleci/android:api-26-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "glpi/build.gradle" }}
- run:
name: Setup environment
command: source ci/scripts/ci_setup.sh
- run:
name: Update version and code
command: source ci/scripts/ci_updateversion.sh
- run:
name: Setup emulator
command: sdkmanager "system-images;android-16;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-16;default;armeabi-v7a"
- run:
name: Launch emulator
command: export LD_LIBRARY_PATH=${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib && emulator64-arm -avd test -noaudio -no-boot-anim -no-window -accel on
background: true
- run:
name: Wait emulator
command: |
# wait for it to have booted
circle-android wait-for-boot
# unlock the emulator screen
sleep 30
adb shell input keyevent 82
- run:
name: Send changelog to gh-page
command: source ci/scripts/ci_changelog.sh
- run:
name: Coverage
command: source ci/scripts/ci_coverage.sh
- run:
name: Javadoc
command: source ci/scripts/ci_javadoc.sh
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "glpi/build.gradle" }}
workflows:
version: 2
build_test_and_deploy:
jobs:
- build
- test_api_v16:
requires:
- build
filters:
branches:
only:
- develop
- test_api_v25:
requires:
- build
filters:
branches:
only:
- develop
- documentation:
requires:
- test_api_v16
- test_api_v25
filters:
branches:
only:
- develop
- deploy_production:
requires:
- build
filters:
branches:
only:
- master
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownProjectSettings">
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="false" showSelectionInPreview="true">
<PanelProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
</PanelProvider>
</PreviewSettings>
<ParserSettings gitHubSyntaxChange="false">
<PegdownExtensions>
<option name="ABBREVIATIONS" value="false" />
<option name="ANCHORLINKS" value="true" />
<option name="ASIDE" value="false" />
<option name="ATXHEADERSPACE" value="true" />
<option name="AUTOLINKS" value="true" />
<option name="DEFINITIONS" value="false" />
<option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" />
<option name="FENCED_CODE_BLOCKS" value="true" />
<option name="FOOTNOTES" value="false" />
<option name="HARDWRAPS" value="false" />
<option name="HTML_DEEP_PARSER" value="false" />
<option name="INSERTED" value="false" />
<option name="QUOTES" value="false" />
<option name="RELAXEDHRULES" value="true" />
<option name="SMARTS" value="false" />
<option name="STRIKETHROUGH" value="true" />
<option name="SUBSCRIPT" value="false" />
<option name="SUPERSCRIPT" value="false" />
<option name="SUPPRESS_HTML_BLOCKS" value="false" />
<option name="SUPPRESS_INLINE_HTML" value="false" />
<option name="TABLES" value="true" />
<option name="TASKLISTITEMS" value="true" />
<option name="TOC" value="false" />
<option name="WIKILINKS" value="true" />
</PegdownExtensions>
<ParserOptions>
<option name="COMMONMARK_LISTS" value="true" />
<option name="DUMMY" value="false" />
<option name="EMOJI_SHORTCUTS" value="true" />
<option name="FLEXMARK_FRONT_MATTER" value="false" />
<option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="false" />
<option name="GFM_TABLE_RENDERING" value="true" />
<option name="GITBOOK_URL_ENCODING" value="false" />
<option name="GITHUB_EMOJI_URL" value="false" />
<option name="GITHUB_LISTS" value="false" />
<option name="GITHUB_WIKI_LINKS" value="true" />
<option name="JEKYLL_FRONT_MATTER" value="false" />
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
</ParserOptions>
</ParserSettings>
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true">
<GeneratorProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
</GeneratorProvider>
<headerTop />
<headerBottom />
<bodyTop />
<bodyBottom />
</HtmlSettings>
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssTextEnabled="false" isDynamicPageWidth="true">
<StylesheetProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
</StylesheetProvider>
<ScriptProviders />
<cssText />
</CssSettings>
<HtmlExportSettings updateOnSave="false" parentDir="$ProjectFileDir$" targetDir="$ProjectFileDir$" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" />
<LinkMapSettings>
<textMaps />
</LinkMapSettings>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MarkdownProjectSettings">
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="false" showSelectionInPreview="true">
<PanelProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
</PanelProvider>
</PreviewSettings>
<ParserSettings gitHubSyntaxChange="false">
<PegdownExtensions>
<option name="ABBREVIATIONS" value="false" />
<option name="ANCHORLINKS" value="true" />
<option name="ASIDE" value="false" />
<option name="ATXHEADERSPACE" value="true" />
<option name="AUTOLINKS" value="true" />
<option name="DEFINITIONS" value="false" />
<option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" />
<option name="FENCED_CODE_BLOCKS" value="true" />
<option name="FOOTNOTES" value="false" />
<option name="HARDWRAPS" value="false" />
<option name="HTML_DEEP_PARSER" value="false" />
<option name="INSERTED" value="false" />
<option name="QUOTES" value="false" />
<option name="RELAXEDHRULES" value="true" />
<option name="SMARTS" value="false" />
<option name="STRIKETHROUGH" value="true" />
<option name="SUBSCRIPT" value="false" />
<option name="SUPERSCRIPT" value="false" />
<option name="SUPPRESS_HTML_BLOCKS" value="false" />
<option name="SUPPRESS_INLINE_HTML" value="false" />
<option name="TABLES" value="true" />
<option name="TASKLISTITEMS" value="true" />
<option name="TOC" value="false" />
<option name="WIKILINKS" value="true" />
</PegdownExtensions>
<ParserOptions>
<option name="COMMONMARK_LISTS" value="true" />
<option name="DUMMY" value="false" />
<option name="EMOJI_SHORTCUTS" value="true" />
<option name="FLEXMARK_FRONT_MATTER" value="false" />
<option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="false" />
<option name="GFM_TABLE_RENDERING" value="true" />
<option name="GITBOOK_URL_ENCODING" value="false" />
<option name="GITHUB_EMOJI_URL" value="false" />
<option name="GITHUB_LISTS" value="false" />
<option name="GITHUB_WIKI_LINKS" value="true" />
<option name="JEKYLL_FRONT_MATTER" value="false" />
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
</ParserOptions>
</ParserSettings>
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true">
<GeneratorProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
</GeneratorProvider>
<headerTop />
<headerBottom />
<bodyTop />
<bodyBottom />
</HtmlSettings>
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssTextEnabled="false" isDynamicPageWidth="true">
<StylesheetProvider>
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
</StylesheetProvider>
<ScriptProviders />
<cssText />
</CssSettings>
<HtmlExportSettings updateOnSave="false" parentDir="$ProjectFileDir$" targetDir="$ProjectFileDir$" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" />
<LinkMapSettings>
<textMaps />
</LinkMapSettings>
</component>
<component name="MavenImportPreferences">
<option name="generalSettings">
<MavenGeneralSettings>
......@@ -140,7 +71,7 @@
</profile-state>
</entry>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8 (3)" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="1.8 (3)" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
#!/bin/bash
#
# Copyright (C) 2017 Teclib'
#
# This file is part of Flyve MDM Inventory Android.
#
# Flyve MDM Inventory Android is a subproject of Flyve MDM. Flyve MDM is a mobile
# device management software.
#
# Flyve MDM Android is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Flyve MDM Inventory Android is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# ------------------------------------------------------------------------------
# @author Rafael Hernandez - rafaelje
# @copyright Copyright (c) 2017 Flyve MDM
# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
# @link https://github.com/flyve-mdm/flyve-mdm-android-inventory
# @link http://www.glpi-project.org/
# @link https://flyve-mdm.com/
# ------------------------------------------------------------------------------
#
# Bintray information
echo bintray.user=$BT_USER >> local.properties
echo bintray.apikey=$BT_APIKEY >> local.properties
# Get version number from package.json
GIT_TAG=$(jq -r ".version" package.json)
# update version name generate on package json
echo version=$GIT_TAG >> local.properties
# send to bintray
./gradlew install
./gradlew bintrayUpload
\ No newline at end of file
#!/bin/bash
#
# Copyright (C) 2017 Teclib'
#
# This file is part of Flyve MDM Inventory Android.
#
# Flyve MDM Inventory Android is a subproject of Flyve MDM. Flyve MDM is a mobile
# device management software.
#
# Flyve MDM Android is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Flyve MDM Inventory Android is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# ------------------------------------------------------------------------------
# @author Rafael Hernandez - rafaelje
# @copyright Copyright (c) 2017 Flyve MDM
# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
# @link https://github.com/flyve-mdm/flyve-mdm-android-inventory
# @link http://www.glpi-project.org/
# @link https://flyve-mdm.com/
# ------------------------------------------------------------------------------
#
# get gh-pages branch
git fetch origin gh-pages
# move to gh-pages
git checkout gh-pages
# clean unstage file on gh-pages to remove all others files gets on checkout
sudo git clean -fdx
# remove local CHANGELOG.md on gh-pages
sudo rm CHANGELOG.md
# get changelog from branch
git checkout $CIRCLE_BRANCH CHANGELOG.md
# create a commit
git commit -m "build(changelog): send changelog.md to gh-page"
# push to branch
git push origin gh-pages
# got back to original branch
git checkout $CIRCLE_BRANCH
\ No newline at end of file
#!/bin/bash
#
# Copyright (C) 2017 Teclib'
#
# This file is part of Flyve MDM Inventory Android.
#
# Flyve MDM Inventory Android is a subproject of Flyve MDM. Flyve MDM is a mobile
# device management software.
#
# Flyve MDM Android is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Flyve MDM Inventory Android is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# ------------------------------------------------------------------------------
# @author Rafael Hernandez - rafaelje
# @copyright Copyright (c) 2017 Flyve MDM
# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
# @link https://github.com/flyve-mdm/flyve-mdm-android-inventory
# @link http://www.glpi-project.org/
# @link https://flyve-mdm.com/
# ------------------------------------------------------------------------------
#
# create code coverage report
./gradlew createDebugCoverageReport
# move code coverage
mv -v inventory/build/reports/coverage reports
#move Android test
mv -v inventory/build/reports/androidTests reports
# replace .resources with resource because github don't support folders with "_" or "." at the beginning
mv reports/debug/.resources reports/debug/resources
# replace .sessions
mv reports/debug/.sessions.html reports/debug/sessions.html
# add code coverage and test result
git add reports -f
# temporal commit
git commit -m "tmp reports"
# get gh-pages branch
git fetch origin gh-pages
# move to gh-pages
git checkout gh-pages
# clean
sudo git clean -fdx
# remove report folder
sudo rm -R reports
# get documentation folder
git checkout $CIRCLE_BRANCH reports
# remove css
sudo rm ./reports/debug/resources/report.css
sudo rm ./reports/androidTests/connected/css/base-style.css
sudo rm ./reports/androidTests/connected/css/style.css
# add new css
cp ./css/coverage.css ./reports/debug/resources/report.css
cp ./css/androidTests.css ./reports/androidTests/connected/css/style.css
touch ./reports/androidTests/connected/css/base-style.css
# add
git add ./reports/debug/resources/report.css
git add ./reports/androidTests/connected/css/style.css
git add ./reports/androidTests/connected/css/base-style.css
# create commit
git commit -m "docs(coverage): update code coverage and test result"
# push to branch
git push origin gh-pages
# got back to original branch
git checkout $CIRCLE_BRANCH
\ No newline at end of file
#!/bin/bash
#
# Copyright (C) 2017 Teclib'
#
# This file is part of Flyve MDM Inventory Android.
#
# Flyve MDM Inventory Android is a subproject of Flyve MDM. Flyve MDM is a mobile
# device management software.
#
# Flyve MDM Android is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Flyve MDM Inventory Android is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# ------------------------------------------------------------------------------
# @author Rafael Hernandez - rafaelje
# @copyright Copyright (c) 2017 Flyve MDM
# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
# @link https://github.com/flyve-mdm/flyve-mdm-android-inventory
# @link http://www.glpi-project.org/
# @link https://flyve-mdm.com/
# ------------------------------------------------------------------------------
#
GIT_TAG=$(jq -r ".version" package.json)
# Push commits and tags to origin branch
# git push --follow-tags origin $CIRCLE_BRANCH
# push tag to github
conventional-github-releaser -t $GH_TOKEN 2> /dev/null || true
# Create zip example code
sudo zip -r $CIRCLE_ARTIFACTS/java_example_code.zip examples/java*
sudo zip -r $CIRCLE_ARTIFACTS/kotlin_example_code.zip examples/kotlin*
# Update release name
github-release edit \
--user $CIRCLE_PROJECT_USERNAME \
--repo $CIRCLE_PROJECT_REPONAME \
--tag ${GIT_TAG} \
--name "Inventory Engine v${GIT_TAG}" \
--description "$(git log -1 --pretty=%B)"
# Upload example code release
github-release upload \
--user $CIRCLE_PROJECT_USERNAME \
--repo $CIRCLE_PROJECT_REPONAME \
--tag ${GIT_TAG} \
--name "java_example.zip" \
--file $CIRCLE_ARTIFACTS/java_example_code.zip
# Upload example code release
github-release upload \
--user $CIRCLE_PROJECT_USERNAME \
--repo $CIRCLE_PROJECT_REPONAME \
--tag ${GIT_TAG} \
--name "kotlin_example.zip" \
--file $CIRCLE_ARTIFACTS/kotlin_example_code.zip
\ No newline at end of file
#!/bin/bash
#
# Copyright (C) 2017 Teclib'
#
# This file is part of Flyve MDM Inventory Android.
#
# Flyve MDM Inventory Android is a subproject of Flyve MDM. Flyve MDM is a mobile
# device management software.
#
# Flyve MDM Android is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Flyve MDM Inventory Android is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# ------------------------------------------------------------------------------
# @author Rafael Hernandez - rafaelje
# @copyright Copyright (c) 2017 Flyve MDM
# @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
# @link https://github.com/flyve-mdm/flyve-mdm-android-inventory
# @link http://www.glpi-project.org/
# @link https://flyve-mdm.com/
# ------------------------------------------------------------------------------
#
# Generate javadoc this folder must be on .gitignore
javadoc -d ./reports/javadoc -sourcepath ./inventory/src/main/java -subpackages . -nonavbar
# delete the index.html file
sudo rm ./reports/javadoc/index.html
# rename the overview-summary.html file toindex.html
mv ./reports/javadoc/overview-summary.html ./reports/javadoc/index.html
# add reports
git add reports -f
# create commit with temporary report folder
git commit -m "tmp report commit"
# get gh-pages branch
git fetch origin gh-pages
# move to gh-pages
git checkout gh-pages
# delete old javadoc folder
sudo rm -R reports/javadoc
# get fresh javadoc folder
git checkout $CIRCLE_BRANCH reports/javadoc
# remove default stylesheet.css
sudo rm ./reports/javadoc/stylesheet.css
# add new css
cp ./css/javadoc.css ./reports/javadoc/stylesheet.css
# git add javadoc folder
git add reports/javadoc
# git add
git add ./reports/javadoc/stylesheet.css
# create commit for documentation
git commit -m "docs(javadoc): update javadoc"
# change headers
ruby ci/add_header.rb
# git add
git add .
# git commit
git commit -m "docs(headers): update headers"
# push to branch
git push origin gh-pages
# got back to original branch
git checkout $CIRCLE_BRANCH
\ No newline at end of file
#!/usr/bin/env bash
# Push commits and tags to origin branch
git push --follow-tags origin $CIRCLE_BRANCH
# Merge back the develop branch step
# go to develop
git checkout develop
# merge with master
git merge master
# push develop
git push origin develop
# return to master
git checkout master
\ No newline at end of file
#!/bin/bash
#
# Copyright (C) 2017 Teclib'
#
# This file is part of Flyve MDM Inventory Android.
#
# Flyve MDM Inventory Android is a subproject of Flyve MDM. Flyve MDM is a mobile
# device management software.
#
# Flyve MDM Android is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# Flyve MDM Inventory Android is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# ------------------------------------------------------------------------------
# @author Rafael Hernandez - rafaelje
# @copyright Copyright (c) 2017 Flyve MDM