Skip to content

Commit 1f0100e

Browse files
committed
add additional stage in make file to rename UI bundle
1 parent 36bda48 commit 1f0100e

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ RUN cd /opt/workroom/gitconvex && \
2020
go build -o ./dist/ && \
2121
mv build/ dist/
2222

23-
RUN pwd
24-
RUN ls -ltr
25-
2623
EXPOSE 9001
2724

2825
CMD go run /opt/workroom/gitconvex/dist/gitconvex-server

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ build:
3333
cd .. && \
3434
mkdir -p ./dist && \
3535
mv build/ ./dist/ && \
36+
mv ./dist/build ./dist/gitconvex-ui
3637
echo "Building final go source with UI bundle" && \
3738
go build -o ./dist && \
3839
echo "Gitconvex build completed!" && \
39-
echo "Use ./dist/gitconvex-server to start Gitconvex on port 9001"
40+
mv ./dist/gitconvex-server ./dist/gitconvex
41+
echo "Use ./dist/gitconvex to start Gitconvex on port 9001"
4042
test:
4143
go test -v ./...
4244
start:

make.bat

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,21 @@ if "%ip%"==%BUILD% (
2828
set NODE_ENV=production
2929
npx tailwindcss build -o src/index.css -c src/tailwind.config.js
3030
npm run build
31-
move .\build ..\
31+
echo "Moving react bundle to gitconvex-ui"
32+
move .\build gitconvex-ui
33+
move .\gitconvex-ui ..\
3234
cd ..
3335
mkdir .\dist
34-
move .\build .\dist\
36+
echo "Moving UI artifacts to dist folder"
37+
move .\gitconvex-ui .\dist\
3538
echo "Removing intermediary folder ui/"
3639
rd /s /q ui
3740
echo "Building gitconvex bundle"
3841
go build -o ./dist
39-
echo "Run ./dist/gitconvex-server.exe to start gitconvex on port 9001"
42+
cd .\dist
43+
rename gitconvex-server.exe gitconvex.exe
44+
echo "Run ./dist/gitconvex.exe to start gitconvex on port 9001"
45+
cd ..
4046
)
4147

4248
if "%ip%"==%TEST% (

server.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ func main() {
5858
router := mux.NewRouter()
5959

6060
// http route handler for provisioning graphql playground UI when the API is directly opened from the browser
61-
6261
router.Path("/gitconvexapi/graph").Handler(playground.Handler("GraphQL", "/query"))
6362
router.Handle("/query", srv)
6463
router.Handle("/gitconvexapi", srv)
@@ -70,7 +69,7 @@ func main() {
7069
)
7170
if execName != "" {
7271
currentDir := filepath.Dir(execName)
73-
buildPath = fmt.Sprintf("%s/build", currentDir)
72+
buildPath = fmt.Sprintf("%s/gitconvex-ui", currentDir)
7473
staticPath = fmt.Sprintf("%s/static", buildPath)
7574
}
7675

0 commit comments

Comments
 (0)