-
Notifications
You must be signed in to change notification settings - Fork 29
/
commits-maven-project.sh
executable file
·33 lines (25 loc) · 1.01 KB
/
commits-maven-project.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
. ./.gh-api-examples.conf
# https://docs.github.com/en/rest/reference/repos#create-or-update-file-contents
# PUT /repos/:owner/:repo/contents/:path
if [ -z "$1" ]
then
repo=$repo
else
repo=$1
fi
python3 setup-maven-project.py
curl ${curl_custom_flags} \
-X PUT \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
${GITHUB_API_BASE_URL}/repos/${org}/${repo}/contents/src/main/java/com/mycompany/app/App.java --data @tmp/App.java.json
curl ${curl_custom_flags} \
-X PUT \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
${GITHUB_API_BASE_URL}/repos/${org}/${repo}/contents/src/test/java/com/mycompany/app/AppTest.java --data @tmp/AppTest.java.json
curl ${curl_custom_flags} \
-X PUT \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
${GITHUB_API_BASE_URL}/repos/${org}/${repo}/contents/pom.xml --data @tmp/maven-pom.json