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

Add a task to run manual tcb commands #284

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Conversation

drewmoseley
Copy link
Contributor

@drewmoseley drewmoseley commented Nov 27, 2024

This adds a task to launch a terminal with tcb-env-setup.sh already sourced and the DOCKER_HOST variable cleared.

@drewmoseley drewmoseley changed the title RFC: Add a task to run manual tcb commands Add a task to run manual tcb commands Nov 27, 2024
@drewmoseley
Copy link
Contributor Author

OK, I had to add a custom bashrc file to properly source tcb-env-setup and make sure that the alias was available. This worked in my checked out sources. I'll try to modify my config to pull a fresh project from my fork to test the full workflow.

@drewmoseley
Copy link
Contributor Author

I was able to test this from scratch creating a new project using my fork of the templates. From my POV this is good to go.

@andreriesco
Copy link
Collaborator

Please add it also to update.json, so it gets updated with the try-template-update task

@drewmoseley
Copy link
Contributor Author

Please add it also to update.json, so it gets updated with the try-template-update task

@andreriesco I don't follow. What do you want me to list in update.json?

@andreriesco
Copy link
Collaborator

Actually, this script is to be used exclusively with the TCB IDE template, or do you think that being able to call this task can be beneficial on any other template also?

@drewmoseley
Copy link
Contributor Author

I was only thinking of the TCB template. I don't currently have any need for it in the other templates.

@andreriesco
Copy link
Collaborator

I think it can be added to the .conf of the tcb template then, here, the scripts folder is generally for scripts that have uses in multiple templates. But inside the tcb folder it's easier to maintain it and to update it on the project

@drewmoseley
Copy link
Contributor Author

@andreriesco I still don't understand. What is it I should add to ./tcb/.conf/update.json? I don't understand how that file is used.

@andreriesco
Copy link
Collaborator

andreriesco commented Dec 5, 2024

This file is for the try-update-templates task to know which files it should update (copy and open the merge window) from the templates repository into the project. Files which are specific of the template. So here for example it updates this three files:

[
    {
        "source": ".github/workflows/build-torizoncore.yaml",
        "target": ".github/workflows/build-torizoncore.yaml"
    },
    {
        "source": ".gitlab-ci.yml",
        "target": ".gitlab-ci.yml"
    },
    {
        "source": "tcbuild.yaml",
        "target": "tcbuild.yaml"
    }
]

And with this script at tcb/.conf, it will become:

[
    {
        "source": ".github/workflows/build-torizoncore.yaml",
        "target": ".github/workflows/build-torizoncore.yaml"
    },
    {
        "source": ".gitlab-ci.yml",
        "target": ".gitlab-ci.yml"
    },
    {
        "source": "tcbuild.yaml",
        "target": "tcbuild.yaml"
    },
    {
        "source": ".conf/bashrc.tcb",
        "target": ".conf/bashrc.tcb"
    },
]

@drewmoseley
Copy link
Contributor Author

OK. Done.

@andreriesco
Copy link
Collaborator

Also, the bashrc.tcb needs to be moved from scripts/bash to tcb/.conf

…nabled.

This task will clear DOCKER_HOST and automatically source tcb-env-setup.sh making it easy
for users to run manual commands.

Signed-off-by: Drew Moseley <drew@moseleynet.net>
@drewmoseley
Copy link
Contributor Author

@andreriesco anything else here?

@andreriesco
Copy link
Collaborator

No, now it looks good to me. I will merge it, thanks

@andreriesco andreriesco merged commit 76cc51d into torizon:dev Dec 20, 2024
2 checks passed
@drewmoseley drewmoseley deleted the tcb-task branch February 24, 2025 16:36
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.

2 participants