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

Move package.toml to be under buildpacks/ #177

Merged
merged 2 commits into from
Sep 25, 2023
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
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ build-buildpacks-jammy: build-sample-root

build-linux-packages: build-sample-root
@echo "> Creating 'hello-world' buildpack package"
$(PACK_CMD) buildpack package cnbs/sample-package:hello-world --config $(SAMPLES_ROOT)/packages/hello-world/package.toml $(PULL_POLICY_NEVER)
$(PACK_CMD) buildpack package cnbs/sample-package:hello-world --config $(SAMPLES_ROOT)/$(PACKAGES_DIR)/hello-world/package.toml $(PULL_POLICY_NEVER)

@echo "> Creating 'hello-universe' buildpack package"
$(PACK_CMD) buildpack package cnbs/sample-package:hello-universe --config $(SAMPLES_ROOT)/packages/hello-universe/package.toml $(PULL_POLICY_NEVER)
$(PACK_CMD) buildpack package cnbs/sample-package:hello-universe --config $(SAMPLES_ROOT)/$(PACKAGES_DIR)/hello-universe/package.toml $(PULL_POLICY_NEVER)

deploy-linux: deploy-linux-bases deploy-linux-packages deploy-linux-builders

Expand Down Expand Up @@ -190,10 +190,10 @@ build-buildpacks-dotnet-framework-2022: build-sample-root

build-windows-packages: build-sample-root
@echo "> Creating 'hello-world-windows' buildpack package"
$(PACK_CMD) buildpack package cnbs/sample-package:hello-world-windows --config $(SAMPLES_ROOT)/packages/hello-world-windows/package.toml $(PULL_POLICY_NEVER)
$(PACK_CMD) buildpack package cnbs/sample-package:hello-world-windows --config $(SAMPLES_ROOT)/$(PACKAGES_DIR)/hello-world-windows/package.toml $(PULL_POLICY_NEVER)

@echo "> Creating 'hello-universe-windows' buildpack package"
$(PACK_CMD) buildpack package cnbs/sample-package:hello-universe-windows --config $(SAMPLES_ROOT)/packages/hello-universe-windows/package.toml $(PULL_POLICY_NEVER)
$(PACK_CMD) buildpack package cnbs/sample-package:hello-universe-windows --config $(SAMPLES_ROOT)/$(PACKAGES_DIR)/hello-universe-windows/package.toml $(PULL_POLICY_NEVER)

deploy-windows-packages:
@echo "> Deploying windows packages..."
Expand Down Expand Up @@ -262,17 +262,20 @@ clean-windows:
# workaround by pivoting samples-root to tmp path with tgz-buildpacks of the same name
ifeq ($(OS),Windows_NT)
SAMPLES_ROOT:=$(shell mkdir -p .tmp && mktemp --directory -p . .tmp/samples-XXX)
PACKAGES_DIR:=packages
build-sample-root:
@mkdir -p $(SAMPLES_ROOT)/buildpacks/

@for bp_dir in ./buildpacks/*/; do \
tar -czf $(SAMPLES_ROOT)/buildpacks/$$(basename $$bp_dir) -C $$bp_dir . ; \
done

@cp -r builders packages $(SAMPLES_ROOT)/
@cp -r builders $(SAMPLES_ROOT)/
@cp -r buildpacks $(SAMPLES_ROOT)/$(PACKAGES_DIR)
else
# No-op for posix pack
SAMPLES_ROOT:=.
PACKAGES_DIR:=buildpacks
build-sample-root:
endif

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[buildpack]
uri = "../../buildpacks/hello-universe-windows"
uri = "."

[[dependencies]]
uri = "../../buildpacks/hello-moon-windows"
uri = "../hello-moon-windows"

[[dependencies]]
uri = "../../buildpacks/hello-world-windows"
uri = "../hello-world-windows"
# Alternatively, to use an image while packaging, you can use:
# uri = "docker://cnbs/sample-package:hello-world-windows"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[buildpack]
uri = "../../buildpacks/hello-universe/"
uri = "."

[[dependencies]]
uri = "../../buildpacks/hello-moon"
uri = "../hello-moon"

[[dependencies]]
uri = "../../buildpacks/hello-world"
uri = "../hello-world"
# Alternatively, to use an image while packaging, you can use:
# uri = "docker://cnbs/sample-package:hello-world"
5 changes: 5 additions & 0 deletions buildpacks/hello-world-windows/package.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[buildpack]
uri = "."

[platform]
os = "windows"
2 changes: 2 additions & 0 deletions buildpacks/hello-world/package.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[buildpack]
uri = "."
8 changes: 0 additions & 8 deletions packages/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions packages/hello-universe-windows/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions packages/hello-universe/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions packages/hello-world-windows/package.toml

This file was deleted.

2 changes: 0 additions & 2 deletions packages/hello-world/package.toml

This file was deleted.