mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-26 16:37:30 +03:00
Add leo clone and publish for circleci
This commit is contained in:
parent
4fc5f3f30c
commit
dd4ee7dd9a
@ -138,6 +138,32 @@ jobs:
|
||||
export LEO=/home/circleci/project/project/bin/leo
|
||||
./project/.circleci/leo-login-logout.sh
|
||||
|
||||
leo-clone:
|
||||
docker:
|
||||
- image: cimg/rust:1.50.0
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/circleci/project/
|
||||
- run:
|
||||
name: leo clone
|
||||
command: |
|
||||
export LEO=/home/circleci/project/project/bin/leo
|
||||
./project/.circleci/leo-clone.sh
|
||||
|
||||
leo-publish:
|
||||
docker:
|
||||
- image: cimg/rust:1.50.0
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/circleci/project/
|
||||
- run:
|
||||
name: leo publish
|
||||
command: |
|
||||
export LEO=/home/circleci/project/project/bin/leo
|
||||
./project/.circleci/leo-publish.sh
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
main-workflow:
|
||||
@ -160,4 +186,7 @@ workflows:
|
||||
- rust-stable
|
||||
- leo-login-logout:
|
||||
requires:
|
||||
- rust-stable
|
||||
- rust-stable
|
||||
- leo-publish:
|
||||
requires:
|
||||
- rust-stable
|
||||
|
16
.circleci/leo-clone.sh
Executable file
16
.circleci/leo-clone.sh
Executable file
@ -0,0 +1,16 @@
|
||||
# leo clone
|
||||
|
||||
$LEO clone leobot/test-app
|
||||
|
||||
# Assert that the 'test-app' folder is not empty
|
||||
|
||||
cd test-app || exit 1
|
||||
if [ "$(ls -A $DIR)" ]; then
|
||||
echo "$DIR is not empty"
|
||||
else
|
||||
echo "$DIR is empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ls -la
|
||||
$LEO run
|
@ -1,4 +1,19 @@
|
||||
# leo login, publish and logout
|
||||
|
||||
$LEO new test-app && cd test-app
|
||||
$LEO login -u "ALEO_PM_USERNAME" -p "ALEO_PM_PASSWORD"
|
||||
|
||||
# sed command below takes 0.1.0 version (which is default for new programs)
|
||||
# and replaces it with GITHUB_RUN_ID - a unique incremental number for each
|
||||
# GH Actions run; [AUTHOR] gets replaced with $USER variable; and we're ready
|
||||
# to publish package with newer version and correct author
|
||||
cat Leo.toml | sed "s/0.1.0/0.1.$GITHUB_RUN_ID/g" | sed "s/\[AUTHOR\]/$USER/g" > Leo.toml
|
||||
|
||||
$LEO publish
|
||||
$LEO logout
|
||||
|
||||
mkdir hello-world && cd hello-world || exit 1
|
||||
$LEO init
|
||||
ls -la
|
||||
$LEO run
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user