Skip to content

Commit 255b06d

Browse files
committed
Fix function packaging on current dir
1 parent 3c85d88 commit 255b06d

File tree

12 files changed

+47
-15
lines changed

12 files changed

+47
-15
lines changed

app/Appwrite/Services/client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
$cli
7070
->task('version')
7171
->action(function() {
72-
Console::log('CLI Version : 0.4.0');
72+
Console::log('CLI Version : 0.5.0');
7373
Console::log('Server Version : 0.7.0');
7474
});
7575

app/Appwrite/Services/functions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,14 +385,14 @@
385385

386386
$cloudFunctionPath = realpath(__DIR__.'/../../../files/'.$code);
387387
$cloudFunctionParentDir = dirname($cloudFunctionPath, 1);
388-
$cloudFunctionDirName = basename($code);
388+
$cloudFunctionDirName = basename($cloudFunctionPath);
389389
if (file_exists($cloudFunctionPath) === false ) {
390390
throw new Exception("Path doesn't exist. Please ensure that the path is within the current directory. ");
391391
}
392392
$archiveName = 'code.tar.gz';
393393
$volumeMountPoint = realpath(__DIR__.'/../../../files/');
394-
exec("tar -zcvf $archiveName --exclude=$archiveName -C ${cloudFunctionParentDir} $cloudFunctionDirName && mv ${archiveName} ${volumeMountPoint}");
395-
$archivePath = realpath($volumeMountPoint."/$archiveName");$archivePath = realpath($volumeMountPoint."/$archiveName");
394+
exec("tar -zcvf $archiveName -C $cloudFunctionParentDir $cloudFunctionDirName && mv $archiveName $volumeMountPoint");
395+
$archivePath = realpath($volumeMountPoint."/$archiveName");
396396
$cFile = new \CURLFile($archivePath, 'application/x-gzip' , basename($archivePath));
397397

398398
$params['code'] = $cFile;

app/Appwrite/Services/help.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
printf($mask, "avatars", "The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.");
1919
printf($mask, "database", "The Database service allows you to create structured collections of documents, query and filter lists of documents");
2020
printf($mask, "functions", "The Functions Service allows you view, create and manage your Cloud Functions.");
21-
printf($mask, "health", "The Health service allows you to both validate and monitor your Appwrite server's health.");
22-
printf($mask, "locale", "The Locale service allows you to customize your app based on your users' location.");
21+
printf($mask, "health", "The Health service allows you to both validate and monitor your Appwrite server's health.");
22+
printf($mask, "locale", "The Locale service allows you to customize your app based on your users' location.");
2323
printf($mask, "storage", "The Storage service allows you to manage your project files.");
2424
printf($mask, "teams", "The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources");
2525
printf($mask, "users", "The Users service allows you to manage your project users.");

bin/avatars

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/sh
22

3-
php /usr/local/code/app/Appwrite/Services/avatars.php $@
3+
if [[ -z "$@" ]]; then
4+
php /usr/local/code/app/Appwrite/Services/avatars.php help
5+
else
6+
php /usr/local/code/app/Appwrite/Services/avatars.php $@
7+
fi

bin/database

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/sh
22

3-
php /usr/local/code/app/Appwrite/Services/database.php $@
3+
if [[ -z "$@" ]]; then
4+
php /usr/local/code/app/Appwrite/Services/database.php help
5+
else
6+
php /usr/local/code/app/Appwrite/Services/database.php $@
7+
fi

bin/functions

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/sh
22

3-
php /usr/local/code/app/Appwrite/Services/functions.php $@
3+
if [[ -z "$@" ]]; then
4+
php /usr/local/code/app/Appwrite/Services/functions.php help
5+
else
6+
php /usr/local/code/app/Appwrite/Services/functions.php $@
7+
fi

bin/health

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/sh
22

3-
php /usr/local/code/app/Appwrite/Services/health.php $@
3+
if [[ -z "$@" ]]; then
4+
php /usr/local/code/app/Appwrite/Services/health.php help
5+
else
6+
php /usr/local/code/app/Appwrite/Services/health.php $@
7+
fi

bin/locale

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/sh
22

3-
php /usr/local/code/app/Appwrite/Services/locale.php $@
3+
if [[ -z "$@" ]]; then
4+
php /usr/local/code/app/Appwrite/Services/locale.php help
5+
else
6+
php /usr/local/code/app/Appwrite/Services/locale.php $@
7+
fi

bin/storage

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/sh
22

3-
php /usr/local/code/app/Appwrite/Services/storage.php $@
3+
if [[ -z "$@" ]]; then
4+
php /usr/local/code/app/Appwrite/Services/storage.php help
5+
else
6+
php /usr/local/code/app/Appwrite/Services/storage.php $@
7+
fi

bin/teams

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/sh
22

3-
php /usr/local/code/app/Appwrite/Services/teams.php $@
3+
if [[ -z "$@" ]]; then
4+
php /usr/local/code/app/Appwrite/Services/teams.php help
5+
else
6+
php /usr/local/code/app/Appwrite/Services/teams.php $@
7+
fi

0 commit comments

Comments
 (0)