Skip to content

Initial code to get Box for phar building, replace DeployCommand #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 13, 2023

Conversation

stloyd
Copy link
Contributor

@stloyd stloyd commented Sep 12, 2023

Info:

stloyd@MacBook-Pro-2 static-php-cli % box info spc.phar 

API Version: 1.1.0

Compression: None

Signature: SHA-1
Signature Hash: 127A780E883099614EA82B7BE52EE1E1A15E4E5B

Metadata: None

Contents: 691 files (2.35MB)
stloyd@MacBook-Pro-2 static-php-cli % ./spc.phar                                                                  
static-php-cli 2.0-rc6

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  build            build CLI binary
  doctor           Diagnose whether the current environment can compile normally
  download         [fetch] Download required sources
  dump-license     Dump licenses for required libraries
  extract          Extract required sources
  help             Display help for a command
  list             List commands
 build
  build:libs       Build dependencies
 dev
  dev:extensions   [list-ext] Helper command that lists available extension details
  dev:php-version  [dev:php-ver] Returns version of PHP located source directory
 micro
  micro:combine    Combine micro.sfx and php code together

@stloyd stloyd force-pushed the box-phar branch 2 times, most recently from 8e049b0 to 21195ab Compare September 12, 2023 08:46
@crazywhalecc crazywhalecc added new feature New feature or request kind/workflow Issues related to workflow or environment kind/framework Issues related to CLI app framework and removed kind/workflow Issues related to workflow or environment labels Sep 12, 2023
@stloyd stloyd marked this pull request as ready for review September 12, 2023 13:32
@crazywhalecc crazywhalecc added the need test This PR has not been tested yet, cannot merge now label Sep 12, 2023
@crazywhalecc crazywhalecc linked an issue Sep 12, 2023 that may be closed by this pull request
@crazywhalecc
Copy link
Owner

crazywhalecc commented Sep 12, 2023

After introducing box, it is a good choice to directly rewrite DeployCommand. Ideally, we can automatically package single executable SPC files for different platforms and upload them when releasing a new version:

  1. Use the command bin/spc download --all to download dependencies
  2. Compile the phpmicro SAPI with minimal extension required by static-php-cli itself: bin/spc build pcntl,posix,mbstring,tokenizer,phar --build-micro
  3. Package project: vendor/bin/box compile
  4. Generate executable binary: bin/spc micro:combine spc.phar
  5. Upload to release artifacts: spc-macos-x86_64.tar.gz

@stloyd
Copy link
Contributor Author

stloyd commented Sep 12, 2023

@crazywhalecc Extracted this as a roadmap for rewrite: #179

@crazywhalecc
Copy link
Owner

Are there any positive considerations for using the Version class?

@stloyd

This comment was marked as outdated.

@stloyd
Copy link
Contributor Author

stloyd commented Sep 13, 2023

@crazywhalecc Removed the version class, Box was able to call the public const in the end. The workflow file was also removed.

@stloyd
Copy link
Contributor Author

stloyd commented Sep 13, 2023

Failure unrelated requires a job re-run (probably an issue with GH actions).

@crazywhalecc crazywhalecc removed the need test This PR has not been tested yet, cannot merge now label Sep 13, 2023
@crazywhalecc crazywhalecc changed the title Initial code to get Box for phar building Initial code to get Box for phar building, replace DeployCommand Sep 13, 2023
@crazywhalecc crazywhalecc merged commit f1d5916 into crazywhalecc:main Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/framework Issues related to CLI app framework new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace custom PHAR build with Box
2 participants