[ci] Fix CircleCI stuff

This commit is contained in:
JAremko 2021-07-01 03:32:29 +03:00 committed by Eugene Yaremenko
parent c59d670d50
commit 85778b6383
5 changed files with 15 additions and 18 deletions

View File

@ -8,47 +8,44 @@ jobs:
- image: jare/spacemacs-circleci:latest
environment:
BASH_ENV: ".circleci/shared"
working_directory: ~/.emacs.d
steps:
- checkout
- run:
name: Make sure that this PR targets develop branch
command: ./.circleci/PR_base
command: .circleci/PR_base
- run:
name: Make sure that this PR doesn't need rebase
command: ./.circleci/PR_rebased
command: .circleci/PR_rebased
"Validate Documentation":
docker:
- image: jare/spacemacs-circleci:latest
environment:
BASH_ENV: ".circleci/shared"
working_directory: ~/.emacs.d
steps:
- checkout
- run:
name: Select changed files
command: ./.circleci/select_pr_changed
command: .circleci/select_pr_changed
- run:
name: export changed documentation files for validation
command: ./.circleci/org/export
command: .circleci/org/export
- run:
name: validating changed documentation files
command: ./.circleci/org/validate
command: .circleci/org/validate
"Update built-in files":
docker:
- image: jare/spacemacs-circleci:latest
environment:
- BASH_ENV: ".circleci/shared"
- PUBLISH: "spacemacs_built_in"
working_directory: ~/.emacs.d
steps:
- checkout
- run:
name: Make patch file
command: ./.circleci/update/upd_built_in
command: .circleci/update/upd_built_in
- run:
name: Open PR if built in files must be updated
command: ./.circleci/update/maybe_pr
command: .circleci/update/maybe_pr
workflows:
version: 2

View File

@ -17,7 +17,7 @@ fail_when_undefined_pr_number
select_changed_orgs
if [ ${#changed_f_as_args[@]} -ne 0 ]; then
emacs -batch -l /opt/spacetools/spacedoc/sdnize/sdnize.el -no-site-file \
-q /root/.emacs.d/ /tmp/exported/ \
-q ~/.emacs.d/ /tmp/exported/ \
$(printf "%s " "${changed_f_as_args[@]}")
if [ $? -ne 0 ]; then
echo "Documentation needs some fixing ;)"

View File

@ -16,7 +16,7 @@ fail_when_undefined_pr_number
select_changed_orgs
if [ ${#changed_f_as_args[@]} -ne 0 ]; then
spacedoc validate -c"./.ci/spacedoc-cfg.edn" /tmp/exported/
spacedoc validate -c".ci/spacedoc-cfg.edn" /tmp/exported/
if [ $? -ne 0 ]; then
echo "Documentation validation failed."
exit 1

View File

@ -17,9 +17,6 @@ if [ ! -f /tmp/built_in.patch ]; then
exit 0
fi
echo_headline "Setting up bot account"
hub_init
echo_headline "Cloning target repository"
target_URL="https://github.com/${prj_owner}/${prj_repo}.git"
git clone "${target_URL}" -b "${CIRCLE_BRANCH}" "/tmp/${PUBLISH}"

View File

@ -12,15 +12,18 @@
skip_when_non_official_repo
built_in_manifest="./.ci/built_in_manifest"
echo_headline "Setting up bot account"
hub_init
built_in_manifest=".ci/built_in_manifest"
lines=$(cat "${built_in_manifest}")
while read line; do
url=$(echo $line | cut -f1 -d " ")
target=$(echo $line | cut -f2 -d " ")
curl "${url}" --output "~/.emacs.d/${target}"
curl "${url}" --output "${target}"
if [ $? -ne 0 ]; then
echo "Failed to update built in file: ${target} from url: ${url}"
echo "Please update manifest file: .emacs.d/.ci/built_in_manifest"
echo "Please update manifest file: ~/.emacs.d/.ci/built_in_manifest"
exit 2
fi
done <"${built_in_manifest}"