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

feat(devbox): Add Cloud MTA Build Tool to devbox #2977

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 40 additions & 39 deletions devbox.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
{
"packages": [
silvestre marked this conversation as resolved.
Show resolved Hide resolved
"path:local-flake#bosh-bootloader",
"path:local-flake#app-autoscaler-cli-plugin",
"path:local-flake#log-cache-cli-plugin",
"path:local-flake#uaac",
"delve@latest",
"gh@latest",
"go-tools@latest",
"gopls@latest",
"nodejs@latest",
"nodePackages.yaml-language-server@latest",
"rubocop@latest",
"rubyPackages.solargraph@latest",
"swagger-cli@latest",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"pre-commit@latest",
"[email protected]",
"[email protected]",
"[email protected]",
"which@latest",
"jq@latest",
"[email protected]",
"python@latest",
"[email protected]",
"[email protected]",
"[email protected]",
"[email protected]",
"bundix@latest",
"oha@latest",
"[email protected]",
"[email protected]",
"act@latest",
"google-cloud-sdk@latest",
"[email protected]",
"temurin-bin-17@latest"
],
"packages": {
"path:local-flake#bosh-bootloader": "",
"path:local-flake#app-autoscaler-cli-plugin": "",
"path:local-flake#log-cache-cli-plugin": "",
"path:local-flake#cloud-mta-build-tool": "",
"path:local-flake#uaac": "",
"credhub-cli": "2.9.29",
"delve": "latest",
"gh": "latest",
"go-tools": "latest",
"gopls": "latest",
"nodejs": "latest",
"nodePackages.yaml-language-server": "latest",
"rubocop": "latest",
"rubyPackages.solargraph": "latest",
"swagger-cli": "latest",
"actionlint": "1.6.27",
"direnv": "2.34.0",
"gnumake": "4.4",
"maven": "3.8.6",
"pre-commit": "latest",
"bosh-cli": "7.3.1",
"golangci-lint": "1.57.2",
"yq-go": "4.43.1",
"which": "latest",
"jq": "latest",
"fly": "7.10.0",
"python": "latest",
"cloudfoundry-cli": "8.7.10",
"shellcheck": "0.10.0",
"go": "1.21.5",
"ruby": "3.3.1",
"ginkgo": "2.19.0",
"bundix": "latest",
"oha": "latest",
"gum": "0.13.0",
"act": "latest",
"google-cloud-sdk": "latest",
"temurin-bin-17": "latest"
},
"shell": {
"init_hook": [
"cf install-plugin -f $(which app-autoscaler-cli-plugin)",
Expand Down
24 changes: 24 additions & 0 deletions local-flake/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,30 @@
ldflags = ["-s" "-w" "-X main.version=${version}"];
};

cloud-mta-build-tool = nixpkgsFor.${system}.buildGoModule rec {
silvestre marked this conversation as resolved.
Show resolved Hide resolved
pname = "Cloud MTA Build Tool";
version = "1.2.26";
silvestre marked this conversation as resolved.
Show resolved Hide resolved

src = nixpkgsFor.${system}.fetchFromGitHub {
owner = "SAP";
repo = "cloud-mta-build-tool";
rev = "v${version}";
hash = "sha256-DKZ9Nj/sNC9dRjyiu4MKjLrIJWluYlZzUHWqEqtrNt4=";
};

vendorHash = "sha256-h8LPsuxvbr/aRhH1vR1fYgBot37yrfiemZTJMKj0zbk=";

ldflags = ["-s" "-w" "-X main.Version=${version}"];

doCheck = false;

postInstall = ''
pushd "$out/bin" &> /dev/null
ln -s 'cloud-mta-build-tool' 'mbt'
popd
'';
};

uaac = nixpkgsFor.${system}.bundlerApp rec {
pname = "cf-uaac";
gemdir = ./.;
Expand Down
6 changes: 1 addition & 5 deletions scripts/asdf2devbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
def get_installed_version(package):
with open(os.path.join(script_dir, '..', 'devbox.json'), 'r') as f:
data = json.load(f)
for pkg in data['packages']:
if pkg.startswith(f"{package}@"):
return pkg.split('@')[1]
return None
return data['packages'][package]

# Read the .tool-versions file and process each line
if __name__ == "__main__":
Expand All @@ -27,7 +24,6 @@ def get_installed_version(package):
"bosh": "bosh-cli",
"cf": "cloudfoundry-cli",
"concourse": "fly",
"concourse": "fly",
"credhub": "credhub-cli",
"gcloud": "google-cloud-sdk",
"golang": "go",
Expand Down
Loading