Skip to content

Commit 36983d2

Browse files
authored
Merge branch 'main' into main
2 parents 51e0837 + 2d19c3b commit 36983d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+835
-365
lines changed

.editorconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
[*]
22
indent_style = space
3-
indent_size = 2
3+
indent_size = 2
4+
5+
[Makefile]
6+
indent_style = tab
7+
indent_size = 4

.github/PR_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Summary
2+
<!-- Provide a high-level summary of the change. -->
3+
This PR fixes #
4+
5+
## Output
6+
<!-- If applicable, please provide examples of the output changes. -->
7+
8+
#### Before
9+
10+
#### After
11+
12+
13+
**Notes for Reviewers**
14+
15+
16+
**[Signed commits](https://github.com/buildpacks/.github/blob/main/CONTRIBUTING.md#sign-off-process)**
17+
- [ ] Yes, I signed my commits.
18+
19+
20+
<!--
21+
Thank you for contributing to Cloud Native Buildpacks!
22+
23+
Contributing Conventions:
24+
25+
1. Run `make prepare-for-pr` before submitting a PR.
26+
2. Sign your commits
27+
28+
By following the community's contribution conventions upfront, the review process will
29+
be accelerated and your PR merged more quickly.
30+
-->

.github/bug_report.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
### **Describe the bug**
2+
A clear and concise description of what the bug is.
3+
4+
### **To Reproduce**
5+
Steps to reproduce the behavior:
6+
1. Go to '...'
7+
2. Click on '....'
8+
3. Scroll down to '....'
9+
4. See error
10+
11+
### **Expected behavior**
12+
A clear and concise description of what you expected to happen.
13+
14+
### **Screenshots**
15+
If applicable, add screenshots or screen captures to help explain your problem.
16+
17+
### **Additional context**
18+
Add any other context about the problem here.
19+
20+
<hr/>
21+
22+
<!--- Do not remove or change this in the issue description. Only update the details above this. --->
23+
**Note:**
24+
* If you want to work on an issue, you should check if it has already been assigned to anyone. **If the issue is free** and you would like to be assigned to it please comment on the issue.
25+
* If you are raising a new issue and want to work on it then also you should comment to get assigned.
26+
* Please **refrain from** adding labels to your issue/pull-request on your own. It is the job of the Project Admin and the Mentors to review your issue/pull-request and add labels accordingly.
27+

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
# Set update schedule for gomod
4+
- package-ecosystem: "gomod"
5+
directory: "/"
6+
schedule:
7+
# Check for updates to GitHub Actions every weekday
8+
interval: "daily"
9+
10+
# Set update schedule for GitHub Actions
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
schedule:
14+
# Check for updates to GitHub Actions every weekday
15+
interval: "daily"

.github/workflows/main.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Git Checkout
1919
uses: actions/checkout@v2
2020
- name: Setup Go environment
21-
uses: actions/[email protected].3
21+
uses: actions/[email protected].4
2222
with:
2323
go-version: '1.x'
2424
- name: Install Dependencies
@@ -35,7 +35,7 @@ jobs:
3535
run: |
3636
make check-links
3737
- name: Upload public folder
38-
uses: actions/upload-artifact@v1
38+
uses: actions/upload-artifact@v2.2.4
3939
env:
4040
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4141
with:
@@ -48,13 +48,14 @@ jobs:
4848
runs-on: ubuntu-latest
4949
steps:
5050
- name: Download public folder
51-
uses: actions/download-artifact@v1
51+
uses: actions/download-artifact@v2.0.10
5252
with:
5353
name: public
54+
path: ./public
5455
- name: Deploy
5556
uses: peaceiris/actions-gh-pages@v3
5657
with:
5758
github_token: ${{ secrets.GITHUB_TOKEN }}
5859
publish_dir: ./public
5960
cname: buildpacks.io
60-
full_commit_message: ${{ github.event.head_commit.message }}
61+
full_commit_message: ${{ github.event.head_commit.message }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ content/docs/tools/pack/cli/pack*
2222
# Tools
2323
/bin
2424
/tmp
25+
26+
/tools/bin

DEVELOPMENT.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
* [jq](https://stedolan.github.io/jq/)
66
* macOS: `brew install jq`
77
* Windows: `choco install jq`
8+
* Ubuntu: `sudo apt install jq`
89
* Make
910
* macOS: `xcode-select --install`
1011
* Windows: `choco install make`
12+
* Ubuntu: `sudo apt install make`
1113

1214
#### Serve
1315

@@ -22,3 +24,9 @@ make serve
2224
```bash
2325
make build
2426
```
27+
28+
#### Clean
29+
30+
```bash
31+
make clean
32+
```

Makefile

Lines changed: 54 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,63 @@ BASE_URL=$(shell echo "$(GITPOD_WORKSPACE_URL)" | sed -r 's;^([^/]*)//(.*);\1//$
1111
endif
1212
endif
1313

14-
ifndef PACK_VERSION
14+
GITHUB_API_OPTS:=
1515
ifdef GITHUB_TOKEN
16-
PACK_VERSION:=$(shell curl -s -H "Authorization: token $(GITHUB_TOKEN)" https://api.github.com/repos/buildpacks/pack/releases/latest | jq -r '.tag_name' | sed -e 's/^v//')
17-
else
18-
PACK_VERSION:=$(shell curl -s https://api.github.com/repos/buildpacks/pack/releases/latest | jq -r '.tag_name' | sed -e 's/^v//')
16+
GITHUB_API_OPTS+=-H "Authorization: token $(GITHUB_TOKEN)"
1917
endif
18+
19+
ifndef PACK_VERSION
20+
PACK_VERSION:=$(shell curl -sSL $(GITHUB_API_OPTS) https://api.github.com/repos/buildpacks/pack/releases/latest | jq -r '.tag_name' | sed -e 's/^v//')
2021
endif
2122

2223
.PHONY: default
2324
default: serve
2425

2526
.PHONY: clean
2627
clean:
27-
rm -rf ./public ./resources
28+
rm -rf ./public ./resources $(TOOLS_BIN)
29+
30+
TOOLS_BIN:=tools/bin
31+
$(TOOLS_BIN):
32+
mkdir $(TOOLS_BIN)
33+
34+
# adapted from https://stackoverflow.com/a/12099167/552902
35+
HUGO_OS:=Linux
36+
HUGO_ARCH:=32bit
37+
HUGO_EXT:=tar.gz
38+
ifeq ($(OS),Windows_NT)
39+
HUGO_OS:=Windows
40+
HUGO_EXT:=zip
41+
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
42+
HUGO_ARCH:=64bit
43+
endif
44+
else
45+
ifeq ($(shell uname -s),Darwin)
46+
HUGO_OS:=macOS
47+
endif
48+
UNAME_P:=$(shell uname -p)
49+
ifneq ($(filter %64,$(UNAME_P)),)
50+
HUGO_ARCH:=64bit
51+
endif
52+
ifneq ($(filter arm%,$(UNAME_P)),)
53+
HUGO_ARCH:=ARM64
54+
endif
55+
endif
2856

29-
.PHONY: install-hugo
30-
install-hugo:
31-
@echo "> Installing hugo..."
32-
cd tools; go install -mod=mod --tags extended github.com/gohugoio/hugo
57+
HUGO_RELEASES_CACHE:=tools/bin/hugo-releases
58+
$(HUGO_RELEASES_CACHE): | $(TOOLS_BIN)
59+
curl -sSL $(GITHUB_API_OPTS) https://api.github.com/repos/gohugoio/hugo/releases/latest > $(HUGO_RELEASES_CACHE)
60+
61+
HUGO_BIN:=tools/bin/hugo
62+
$(HUGO_BIN): $(HUGO_RELEASES_CACHE)
63+
$(HUGO_BIN):
64+
@echo "> Installing hugo for $(HUGO_OS) ($(HUGO_ARCH))..."
65+
curl -sSL -o $(HUGO_BIN).$(HUGO_EXT) $(shell cat $(HUGO_RELEASES_CACHE) | jq -r '[.assets[] | select (.name | test("extended.*$(HUGO_OS)-$(HUGO_ARCH).*$(HUGO_EXT)"))][0] | .browser_download_url')
66+
ifeq ($(HUGO_EXT), zip)
67+
unzip $(HUGO_BIN).$(HUGO_EXT) -d $(TOOLS_BIN)
68+
else
69+
tar mxfz $(HUGO_BIN).$(HUGO_EXT) -C $(TOOLS_BIN) hugo
70+
endif
3371

3472
.PHONY: upgrade-pack
3573
upgrade-pack: pack-version
@@ -53,9 +91,9 @@ install-ugo:
5391
.PHONY: pack-docs-update
5492
pack-docs-update: upgrade-pack
5593
@echo "> Updating Pack CLI Documentation"
56-
@echo "> SHA of contents (before update):" `find ./content/docs/tools/pack -type f -print0 | xargs -0 sha1sum | sha1sum | cut -d' ' -f1`
94+
@echo "> SHA of contents (before update):" `find ./content/docs/tools/pack -type f -print0 | xargs -0 sha1sum | sha1sum | cut -d' ' -f1`
5795
cd tools; go run -mod=mod get_pack_commands.go
58-
@echo "> SHA of contents (after update):" `find ./content/docs/tools/pack -type f -print0 | xargs -0 sha1sum | sha1sum | cut -d' ' -f1`
96+
@echo "> SHA of contents (after update):" `find ./content/docs/tools/pack -type f -print0 | xargs -0 sha1sum | sha1sum | cut -d' ' -f1`
5997

6098
.PHONY: pack-version
6199
pack-version: export PACK_VERSION:=$(PACK_VERSION)
@@ -67,19 +105,19 @@ pack-version:
67105

68106
.PHONY: serve
69107
serve: export PACK_VERSION:=$(PACK_VERSION)
70-
serve: install-hugo pack-version pack-docs-update
108+
serve: $(HUGO_BIN) pack-version pack-docs-update
71109
@echo "> Serving..."
72110
ifeq ($(BASE_URL),)
73-
hugo server --disableFastRender --port=$(SERVE_PORT)
111+
$(HUGO_BIN) server --disableFastRender --port=$(SERVE_PORT)
74112
else
75-
hugo server --disableFastRender --port=$(SERVE_PORT) --baseURL=$(BASE_URL) --appendPort=false
113+
$(HUGO_BIN) server --disableFastRender --port=$(SERVE_PORT) --baseURL=$(BASE_URL) --appendPort=false
76114
endif
77115

78116
.PHONY: build
79117
build: export PACK_VERSION:=$(PACK_VERSION)
80-
build: install-hugo pack-version pack-docs-update
118+
build: $(HUGO_BIN) pack-version pack-docs-update
81119
@echo "> Building..."
82-
hugo
120+
$(HUGO_BIN)
83121

84122
.PHONY: test
85123
test: install-pack-cli install-ugo

content/docs/app-developer-guide/build-a-windows-app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ summary="The basics of taking your Windows app from source code to runnable imag
66

77
> **EXPERIMENTAL:**
88
>
9-
> - Please note that **Windows container support is currently experimental**. You may be asked to enable experimental features in `pack` when running the following commands. Simply follow the on-screen instructions to do so.
9+
> - Please note that **Windows container support is currently experimental**. You may be asked to enable experimental features in `pack` when running the following commands. Simply follow the on-screen instructions to do so.
1010
> - If you encounter any problems while experimenting, we'd love for you to let us know by filing an issue on the [pack][pack-issues] or [lifecycle][lifecycle-issues] repo.
1111
1212
### Recommended reading

content/docs/app-developer-guide/build-an-app.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ docker run --rm -p 8080:8080 sample-app
5555

5656
The app should now be running and accessible via [localhost:8080](http://localhost:8080).
5757

58+
## What about ARM apps?
59+
60+
Linux ARM image builds are now supported!
61+
62+
<a href="/docs/app-developer-guide/build-an-arm-app" class="button bg-blue">Linux ARM build guide</a>
63+
5864
## What about Windows apps?
5965

6066
Windows image builds are now supported!

0 commit comments

Comments
 (0)