-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
- Loading branch information
Showing
9 changed files
with
149 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,121 @@ | ||
version: 2.1 | ||
jobs: | ||
build: | ||
prepare: | ||
working_directory: ~/gui_build | ||
docker: | ||
- image: ansuel/gui-autobuild-image:2 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Check file ending | ||
command: bash ./scripts/1-check_file_ending.sh | ||
- run: | ||
name: Minify css and javascript | ||
command: bash ./scripts/1-compress_css_javascript.sh | ||
- run: | ||
name: Update po | ||
command: python3 ./scripts/update_po.py | ||
- persist_to_workspace: | ||
root: ~/gui_build | ||
paths: | ||
- decompressed | ||
- data | ||
- scripts | ||
- inizialize_gui.sh | ||
detect_build: | ||
working_directory: ~/gui_build | ||
docker: | ||
- image: ansuel/gui-autobuild-image:2 | ||
steps: | ||
- attach_workspace: | ||
at: ~/gui_build | ||
- run: | ||
name: Check built type from last git log | ||
command: bash ./scripts/0-detect-build-type.sh | ||
#- restore_cache: | ||
# keys: latest-file-key | ||
- persist_to_workspace: | ||
root: ~/gui_build | ||
paths: | ||
- data | ||
increment_version: | ||
working_directory: ~/gui_build | ||
docker: | ||
- image: ansuel/gui-autobuild-image:2 | ||
steps: | ||
- attach_workspace: | ||
at: ~/gui_build | ||
- run: | ||
name: Increment version from latest build | ||
command: bash ./scripts/1-increment_autobuild_ver.sh | ||
- persist_to_workspace: | ||
root: ~/gui_build | ||
paths: | ||
- decompressed | ||
- data | ||
init_and_update: | ||
working_directory: ~/gui_build | ||
docker: | ||
- image: ansuel/gui-autobuild-image:2 | ||
steps: | ||
- attach_workspace: | ||
at: ~/gui_build | ||
- run: | ||
name: Minify css and javascript | ||
command: bash ./scripts/1-compress_css_javascript.sh | ||
name: Set new version in rootdevice | ||
command: bash ./scripts/2-set_new_version.sh | ||
- run: | ||
name: Clone autobuild repo | ||
command: bash ./scripts/2-clone_autobuild_dir.sh | ||
- run: | ||
name: Update po | ||
command: python3 ./scripts/update_po.py | ||
- run: | ||
name: Inizialize Gui | ||
command: bash ./inizialize_gui.sh | ||
- run: | ||
name: Upload new build, build and latest.version | ||
command: bash ./scripts/3-update_autobuild_ver.sh | ||
- run: | ||
name: Committing updated po to master | ||
command: bash ./scripts/6-commit_po.sh | ||
#- save_cache: | ||
# key: latest-file-key | ||
# paths: | ||
# - ~/gui-dev-build-auto/latest.version | ||
- persist_to_workspace: | ||
root: ~/gui_build | ||
paths: | ||
- compressed | ||
- scripts | ||
- data | ||
|
||
publish-github-release: | ||
commit_po_changes: | ||
working_directory: ~/gui_build | ||
docker: | ||
- image: cibuilds/github:0.10 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/gui_build | ||
- run: | ||
name: Committing updated po to master | ||
command: bash ./scripts/6-commit_po.sh | ||
publish_github_release: | ||
working_directory: ~/gui_build | ||
docker: | ||
- image: cibuilds/github:0.10 | ||
steps: | ||
- attach_workspace: | ||
at: /tmp/gui_build | ||
at: ~/gui_build | ||
- run: | ||
name: "Publish Release on GitHub" | ||
command: bash /tmp/gui_build/scripts/7-push-release.sh | ||
command: bash ./scripts/7-push-release.sh | ||
|
||
workflows: | ||
version: 2 | ||
build_and_deploy: | ||
jobs: | ||
- build | ||
- publish-github-release: | ||
- prepare | ||
- detect_build: | ||
requires: | ||
- prepare | ||
- increment_version: | ||
requires: | ||
- prepare | ||
- commit_po_changes: | ||
requires: | ||
- prepare | ||
- init_and_update: | ||
requires: | ||
- detect_build | ||
- increment_version | ||
- publish_github_release: | ||
requires: | ||
- build | ||
- init_and_update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
last_log="$(git log --oneline -n 1)" | ||
|
||
if [ ! -f $HOME/gui_build/data ]; then | ||
mkdir $HOME/gui_build/data | ||
fi | ||
|
||
if [ "$( echo "$last_log" | grep "\[STABLE\]" )" ]; then | ||
echo "Detected STABLE build." | ||
touch ~/.stable | ||
echo STABLE > $HOME/gui_build/data/type | ||
else | ||
echo "Detected DEV build." | ||
touch ~/.dev | ||
echo DEV > $HOME/gui_build/data/type | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
echo "Fixing file..." | ||
|
||
nfile=0 | ||
|
||
check_file_ending() { | ||
for file in $1/*; do | ||
if [ -d $file ]; then | ||
check_file_ending $file | ||
else | ||
if [ -f $file ]; then | ||
nfile=$[$nfile +1] | ||
echo -ne 'File scanned: '$nfile'\r' | ||
if [ $( dos2unix -ic $file ) ]; then | ||
dos2unix $file | ||
echo "Detected bad line-ending here: $file" | ||
fi | ||
fi | ||
fi | ||
done | ||
|
||
} | ||
|
||
check_file_ending decompressed | ||
echo "" | ||
echo "File fixed!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
version="$(cat $HOME/gui_build/data/version)" | ||
rootdevice_file="$HOME/gui_build/decompressed/base/etc/init.d/rootdevice" | ||
sed -i s#version_gui=TO_AUTO_COMPLETE#version_gui=$ver# $rootdevice_file | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters