From a0332f64809b0107fdd072304c53dd88b6c23297 Mon Sep 17 00:00:00 2001 From: Netkas Date: Sat, 25 Feb 2023 00:05:03 -0500 Subject: [PATCH] Initial Commit --- .gitignore | 1 + .gitlab-ci.yml | 43 ++++++++++++++++++++ .idea/.gitignore | 8 ++++ .idea/inspectionProfiles/Project_Default.xml | 26 ++++++++++++ .idea/modules.xml | 8 ++++ .idea/php.xml | 25 ++++++++++++ .idea/tempfile.iml | 10 +++++ .idea/vcs.xml | 6 +++ LICENSE | 14 +++++++ Makefile | 8 ++++ README.md | 8 ++++ project.json | 42 +++++++++++++++++++ src/TempFile/TempFile.php | 8 ++++ 13 files changed, 207 insertions(+) create mode 100644 .gitignore create mode 100644 .gitlab-ci.yml create mode 100644 .idea/.gitignore create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/php.xml create mode 100644 .idea/tempfile.iml create mode 100644 .idea/vcs.xml create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 README.md create mode 100644 project.json create mode 100644 src/TempFile/TempFile.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d163863 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..c416e4a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,43 @@ +image: php:8.1 + +before_script: + # Install some stuff that the image doesn't come with + - apt update -yqq + - apt install git libpq-dev libzip-dev zip make wget gnupg -yqq + + # Install phive + - wget -O phive.phar https://phar.io/releases/phive.phar + - wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc + - gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79 + - gpg --verify phive.phar.asc phive.phar + - chmod +x phive.phar + - mv phive.phar /usr/local/bin/phive + + # Install phab + - phive install phpab --global --trust-gpg-keys 0x2A8299CE842DD38C + + # Install the latest version of ncc (Nosial Code Compiler) + - git clone https://git.n64.cc/nosial/ncc.git + - cd ncc + - make redist + - php build/src/INSTALL --auto --install-composer + - cd .. && rm -rf ncc + +build: + script: + - ncc build --config release --log-level debug + artifacts: + paths: + - build/ + rules: + - if: $CI_COMMIT_BRANCH + +release: + stage: deploy + script: + - ncc build --config release --log-level debug + artifacts: + paths: + - build/ + rules: + - if: $CI_COMMIT_TAG \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..ea8af9c --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,26 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..953339e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..05fa7cb --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/tempfile.iml b/.idea/tempfile.iml new file mode 100644 index 0000000..77098d0 --- /dev/null +++ b/.idea/tempfile.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2ec854b --- /dev/null +++ b/LICENSE @@ -0,0 +1,14 @@ +Copyright 2022-2023 Nosial All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..04ccb8f --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +release: + ncc build --config="release" + +install: + ncc package install --package="build/release/net.nosial.tempfile.ncc" --skip-dependencies --reinstall -y + +uninstall: + ncc package uninstall -y --package="net.nosial.tempfile" \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..f230365 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# TempFile + +Coming soon... + +## License + +This library is licensed under the MIT license, see the LICENSE file +for more information. \ No newline at end of file diff --git a/project.json b/project.json new file mode 100644 index 0000000..b66685d --- /dev/null +++ b/project.json @@ -0,0 +1,42 @@ +{ + "project": { + "compiler": { + "extension": "php", + "minimum_version": "8.0", + "maximum_version": "8.2" + }, + "options": [] + }, + "assembly": { + "name": "TempFile", + "package": "net.nosial.tempfile", + "version": "1.0.0", + "uuid": "910f98fe-b4c9-11ed-b13f-fdc283a6db6d" + }, + "build": { + "source_path": "src", + "default_configuration": "debug", + "define_constants": { + "ASSEMBLY_NAME": "%ASSEMBLY.NAME%", + "ASSEMBLY_PACKAGE": "%ASSEMBLY.PACKAGE%", + "ASSEMBLY_VERSION": "%ASSEMBLY.VERSION%", + "ASSEMBLY_UID": "%ASSEMBLY.UID%" + }, + "configurations": [ + { + "name": "debug", + "output_path": "build/debug", + "define_constants": { + "DEBUG": "1" + } + }, + { + "name": "release", + "output_path": "build/release", + "define_constants": { + "DEBUG": "0" + } + } + ] + } +} \ No newline at end of file diff --git a/src/TempFile/TempFile.php b/src/TempFile/TempFile.php new file mode 100644 index 0000000..7ad7c06 --- /dev/null +++ b/src/TempFile/TempFile.php @@ -0,0 +1,8 @@ +