Skip to content
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

Env dependant tag creation #25

Closed
wants to merge 4 commits into from
Closed

Env dependant tag creation #25

wants to merge 4 commits into from

Conversation

Pastajello
Copy link

Hello :D

So I wanted to have .net tag creation that i implemented it myself :D

The code could be improved Im pretty sure. For now I've had the occasion to test it on Windows.
Test for Mac could be nice. - Ill do it on 17.08

Im pretty shitty with js/ts.

So to publish and generate the tar that I wanted and to replicate the steps I've used 'child process' instead of using some libraries/pacakges.
If its a good way to do this I do not know.
Also, to make things easier for me I've added 1 more step in tag creation -> runtime selection, with this it could be made possible to get more ways for creating tags for other runtimes. Automatic discovery of runtime could be faulty.
And I was to lazy to do this.

If You have some ideas/code changes feel free :D

@Pastajello
Copy link
Author

Also working on Mac :)

Copy link
Member

@alexweininger alexweininger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these changes look good overall. Do you know if there are any other runtimes that will need custom behavior like .NET?

Comment on lines +69 to +73
// there is a special way to publishing a tag for .net5.0
const envPick = await window.showQuickPick(
[".net5.0", "other"],
{ placeHolder: "Select runtime" }
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good way to detect automatically if they are using .NET? If so, we might be able to skip this prompt.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we could. We could chek if there is a *.csproj in the folder. Then the prject is using .NET
Now project can be using Net3.1 or Net5.0, there we would need to read the *.csproj and find out what version it is from there :(

@alexweininger alexweininger linked an issue Aug 17, 2021 that may be closed by this pull request
@Pastajello
Copy link
Author

I think these changes look good overall. Do you know if there are any other runtimes that will need custom behavior like .NET?

I've checked it quickly from demos:
python:
PIP_TARGET=./.appwrite pip install -r ./requirements.txt --upgrade --ignore-installed
tar -zcvf code.tar.gz

deno:
tar

nodejs:
npm install
tar

kotlin:
kotlinc HelloWorld.kt -include-runtime -d HelloWorld.jar

java:
javac ./HelloWorld.java

dart:
dart pub get
tar -zcvf code.tar.gz project

php:
tar -zcvf code.tar.gz .

But from documentation it seems that some steps are necesarry for package-manager runtimes:

python(already included):
PIP_TARGET=./.appwrite pip install -r ./requirements.txt --upgrade --ignore-installed

dart:
PUB_CACHE=./.appwrite pub get

deno:
DENO_DIR=./.appwrite deno cache main.ts

ruby:
docker run --rm -v $(pwd):/app -w /app --env GEM_HOME=./.appwrite appwrite/env-ruby-2.7:1.0.2 bundle install

SOOO, in short. Most runtimes have some custom stuff :D but someone would have to test it

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating tag for .net is not working
2 participants