-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' of https://github.com/HugoByte/aurras into next
- Loading branch information
Showing
13 changed files
with
82 additions
and
47 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
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
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
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
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,16 +1,18 @@ | ||
if [ -e $TEMP_DIR ]; then | ||
echo "Clearing previously packed action files." | ||
rm -rf $TEMP_DIR | ||
if [ "$build" = true ]; then | ||
if [ -e $TEMP_DIR ]; then | ||
echo "Clearing previously packed action files." | ||
rm -rf $TEMP_DIR | ||
fi | ||
|
||
mkdir -p $TEMP_DIR | ||
echo "Creating temporary directory" | ||
|
||
echo "Copying files to temporary directory" | ||
cp -r "$SRC_DIR/package.json" "$SRC_DIR/lib" "$SRC_DIR/main.js" $TEMP_DIR | ||
|
||
cd $TEMP_DIR | ||
|
||
yarn install --production=true | ||
|
||
zip -r "$TEMP_DIR/main.zip" * | ||
fi | ||
|
||
mkdir -p $TEMP_DIR | ||
echo "Creating temporary directory" | ||
|
||
echo "Copying files to temporary directory" | ||
cp -r "$SRC_DIR/package.json" "$SRC_DIR/lib" "$SRC_DIR/main.js" $TEMP_DIR | ||
|
||
cd $TEMP_DIR | ||
|
||
yarn install --production=true | ||
|
||
zip -r "$TEMP_DIR/main.zip" * |
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,17 +1,17 @@ | ||
DOCKER_IMAGE="hugobyte/openwhisk-runtime-rust:v0.2" | ||
|
||
if [ -e $TEMP_DIR ]; then | ||
echo "Clearing previously packed action files." | ||
rm -rf $TEMP_DIR | ||
if [ "$build" = true ]; then | ||
if [ -e $TEMP_DIR ]; then | ||
echo "Clearing previously packed action files." | ||
rm -rf $TEMP_DIR | ||
fi | ||
|
||
mkdir -p $TEMP_DIR | ||
echo "Creating temporary directory" | ||
|
||
echo "Building Source to $TEMP_DIR/main.zip" | ||
|
||
cd $SRC_DIR | ||
|
||
zip -r - Cargo.toml src | docker run -e RELEASE=true -i --rm $DOCKER_IMAGE -compile main > "$TEMP_DIR/main.zip" | ||
fi | ||
|
||
mkdir -p $TEMP_DIR | ||
echo "Creating temporary directory" | ||
|
||
echo "Building Source to $TEMP_DIR/main.zip" | ||
|
||
cd $SRC_DIR | ||
|
||
zip -r - Cargo.toml src | docker run -e RELEASE=true -i --rm $DOCKER_IMAGE -compile main > "$TEMP_DIR/main.zip" | ||
|
||
cd $TEMP_DIR |
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,11 @@ | ||
array_contains () { | ||
local seeking=$1; shift | ||
local in=1 | ||
for element; do | ||
if [[ $element == "$seeking" ]]; then | ||
in=0 | ||
break | ||
fi | ||
done | ||
return $in | ||
} |