Skip to content

Commit

Permalink
Merge branch 'master' into console-assert-error
Browse files Browse the repository at this point in the history
  • Loading branch information
collinc97 committed Mar 9, 2021
2 parents 64cc9fa + b0e3b6b commit a18b757
Show file tree
Hide file tree
Showing 918 changed files with 9,788 additions and 10,806 deletions.
5 changes: 1 addition & 4 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
[build]
[target.'cfg(not(target_arch = "wasm32"))']
rustflags = ["-C", "target-cpu=native"]

[net]
git-fetch-with-cli = true
34 changes: 33 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -160,4 +186,10 @@ workflows:
- rust-stable
- leo-login-logout:
requires:
- rust-stable
- rust-stable
- leo-clone:
requires:
- rust-stable
- leo-publish:
requires:
- rust-stable
18 changes: 18 additions & 0 deletions .circleci/leo-clone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# leo clone

# Clone the test-app package.
export PACKAGE="$ALEO_PM_USERNAME/test-app"
$LEO clone $PACKAGE

# 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
56 changes: 56 additions & 0 deletions .circleci/leo-publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# leo login, publish and logout

# Login
$LEO login -u "$ALEO_PM_USERNAME" -p "$ALEO_PM_PASSWORD"

# Clone the test-app package.
export PACKAGE="$ALEO_PM_USERNAME/test-app"
$LEO clone $PACKAGE
cd test-app || exit 1

# Fetch the current Leo package version number.
#
# 1. Print out the Leo.toml file.
# 2. Search for a line with the word "version".
# 3. Isolate that into a single line.
# 4. Split the line from the '=' sign and keep the right-hand side.
# 5. Remove the quotes around the version number.
# 6. Trim any excess whitespace.
export CURRENT=$(cat Leo.toml \
| grep version \
| head -1 \
| awk -F= '{ print $2 }' \
| sed 's/[",]//g' \
| xargs)

# Increment the current Leo package version number by 1.
#
# 1. Print out the Leo.toml file.
# 2. Search for a line with the word "version".
# 3. Isolate that into a single line.
# 4. Split the line from the '=' sign and keep the right-hand side.
# 5. Remove the quotes around the version number.
# 6. Trim any excess whitespace.
# 7. Increment the version number by 1 (on the semver patch).
#
# https://stackoverflow.com/questions/8653126/how-to-increment-version-number-in-a-shell-script
export UPDATED=$(cat Leo.toml \
| grep version \
| head -1 \
| awk -F= '{ print $2 }' \
| sed 's/[",]//g' \
| xargs \
| awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}')

# Write the updated Leo package version number to the Leo.toml file.
export TOML=$(cat Leo.toml | sed "s/$CURRENT/$UPDATED/g")
echo "$TOML" > Leo.toml

# Run the package to confirm the manifest remains well-formed.
$LEO run

# Publish the package to Aleo.pm
$LEO publish

# Logout
$LEO logout
Binary file removed .resources/banner.png
Binary file not shown.
2 changes: 1 addition & 1 deletion .resources/release-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.2.2
v1.2.3
70 changes: 0 additions & 70 deletions .travis.yml

This file was deleted.

Binary file removed .travis/travis-snarkos.enc
Binary file not shown.
Loading

0 comments on commit a18b757

Please sign in to comment.