Skip to content

Commit c0d85bf

Browse files
committed
Initial public release
0 parents  commit c0d85bf

167 files changed

Lines changed: 36782 additions & 0 deletions

File tree

Some content is hidden

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

.build_version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.1

.github/workflows/deploy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
deploy:
19+
runs-on: ubuntu-latest
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment. outputs.page_url }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: subosito/flutter-action@v2
27+
with:
28+
channel: 'stable'
29+
30+
- name: Generate build version
31+
id: version
32+
run: echo "APP_VERSION=APP-$(date +%s)" >> $GITHUB_OUTPUT
33+
34+
- run: flutter pub get
35+
- run: dart run build_runner build --delete-conflicting-outputs
36+
- run: flutter build web --release --base-href "/" --dart-define=API_KEY=${{ secrets.API_KEY }} --dart-define=APP_VERSION=${{ steps.version.outputs.APP_VERSION }}
37+
38+
- uses: actions/configure-pages@v4
39+
40+
- uses: actions/upload-pages-artifact@v3
41+
with:
42+
path: build/web
43+
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.build/
9+
.buildlog/
10+
.history
11+
.svn/
12+
.swiftpm/
13+
migrate_working_dir/
14+
15+
# IntelliJ related
16+
*.iml
17+
*.ipr
18+
*.iws
19+
.idea/
20+
21+
# The .vscode folder contains launch configuration and tasks you configure in
22+
# VS Code which you may wish to be included in version control, so this line
23+
# is commented out by default.
24+
#.vscode/
25+
26+
# Flutter/Dart/Pub related
27+
**/doc/api/
28+
**/ios/Flutter/.last_build_id
29+
.dart_tool/
30+
.flutter-plugins
31+
.flutter-plugins-dependencies
32+
.pub-cache/
33+
.pub/
34+
/build/
35+
36+
# Symbolication related
37+
app.*.symbols
38+
39+
# Obfuscation related
40+
app.*.map.json
41+
42+
# Android Studio will place build artifacts here
43+
/android/app/debug
44+
/android/app/profile
45+
/android/app/release
46+
47+
# Android signing keys (never commit)
48+
android/key.properties
49+
*.jks
50+
*.keystore
51+
52+
# iOS generated files
53+
/ios/Flutter/Flutter.framework
54+
/ios/Flutter/Flutter.podspec
55+
/ios/Runner/GeneratedPluginRegistrant.*
56+
/ios/.symlinks/
57+
/ios/Pods/
58+
59+
# Web generated files
60+
/web/*.dart.js
61+
/web/*.dart.js.map
62+
63+
# Code coverage
64+
coverage/
65+
66+
# Test related
67+
test/.test_coverage.dart
68+
69+
# Platform-generated config (machine-specific)
70+
android/local.properties
71+
ios/Flutter/Generated.xcconfig
72+
ios/Flutter/flutter_export_environment.sh
73+
74+
# Hive generated models (regenerate with build_runner)
75+
*.g.dart
76+
77+
# Debug logs
78+
debuglog/
79+
meshmapper-debug-*.txt
80+
81+
# Test/debug output
82+
drive_route_map*.html
83+
84+
# Claude Code
85+
.claude/
86+
CLAUDE.md

.metadata

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "3b62efc2a3da49882f43c372e0bc53daef7295a6"
8+
channel: "stable"
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
17+
base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
18+
- platform: ios
19+
create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
20+
base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
21+
22+
# User provided section
23+
24+
# List of Local paths (relative to this file) that should be
25+
# ignored by the migrate tool.
26+
#
27+
# Files that are not part of the templates will be ignored by default.
28+
unmanaged_files:
29+
- 'lib/main.dart'
30+
- 'ios/Runner.xcodeproj/project.pbxproj'

.vscode/tasks.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Flutter: Build & Serve Web",
6+
"type": "shell",
7+
"command": "
8+
",
9+
"isBackground": true,
10+
"problemMatcher": [],
11+
"group": "build",
12+
"presentation": {
13+
"echo": true,
14+
"reveal": "always",
15+
"focus": false,
16+
"panel": "dedicated",
17+
"showReuseMessage": false
18+
}
19+
}
20+
]
21+
}

Build.sh

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
#!/bin/bash
2+
3+
# MeshMapper Build Script
4+
# Builds Android APK, Android AAB, and iOS IPA with the same epoch timestamp
5+
6+
set -e # Exit on any error
7+
8+
# Semver comparison: returns 0 (true) if $1 >= $2
9+
version_gte() {
10+
local IFS=.
11+
local i ver1=($1) ver2=($2)
12+
for ((i=0; i<3; i++)); do
13+
if ((${ver1[i]:-0} > ${ver2[i]:-0})); then return 0; fi
14+
if ((${ver1[i]:-0} < ${ver2[i]:-0})); then return 1; fi
15+
done
16+
return 0
17+
}
18+
19+
# API key - prompt if not set via environment variable
20+
if [ -z "$MESHMAPPER_API_KEY" ]; then
21+
echo "Enter MeshMapper API key:"
22+
read -s MESHMAPPER_API_KEY
23+
if [ -z "$MESHMAPPER_API_KEY" ]; then
24+
echo "Error: API key is required."
25+
exit 1
26+
fi
27+
echo ""
28+
fi
29+
30+
# Android signing - prompt for passwords if not set
31+
if [ -z "$SIGNING_STORE_PASSWORD" ]; then
32+
echo "Enter keystore password:"
33+
read -s SIGNING_STORE_PASSWORD
34+
export SIGNING_STORE_PASSWORD
35+
fi
36+
37+
if [ -z "$SIGNING_KEY_PASSWORD" ]; then
38+
echo "Enter key password (or press Enter if same as keystore):"
39+
read -s SIGNING_KEY_PASSWORD
40+
if [ -z "$SIGNING_KEY_PASSWORD" ]; then
41+
SIGNING_KEY_PASSWORD="$SIGNING_STORE_PASSWORD"
42+
fi
43+
export SIGNING_KEY_PASSWORD
44+
fi
45+
46+
# Read last version from .build_version
47+
VERSION_FILE="$(dirname "$0")/.build_version"
48+
if [ -f "$VERSION_FILE" ]; then
49+
LAST_VERSION=$(cat "$VERSION_FILE")
50+
echo ""
51+
echo "Current version: $LAST_VERSION"
52+
else
53+
LAST_VERSION="0.0.0"
54+
echo ""
55+
echo "No .build_version found, assuming $LAST_VERSION"
56+
fi
57+
58+
# Generate single epoch for all builds (used as build-number regardless of release type)
59+
EPOCH=$(date +%s)
60+
61+
# Release type prompt
62+
echo ""
63+
echo "Release type?"
64+
echo " 1) Dev (APP-<epoch>)"
65+
echo " 2) Production (APP-x.y.z)"
66+
echo ""
67+
read -p "Select [1]: " RELEASE_TYPE
68+
RELEASE_TYPE=${RELEASE_TYPE:-1}
69+
70+
if [ "$RELEASE_TYPE" = "2" ]; then
71+
# Production build - prompt for version
72+
while true; do
73+
read -p "Enter version [$LAST_VERSION]: " VERSION_NUMBER
74+
VERSION_NUMBER=${VERSION_NUMBER:-$LAST_VERSION}
75+
76+
# Validate semver format
77+
if ! [[ "$VERSION_NUMBER" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
78+
echo "Error: Version must be in X.Y.Z format (e.g. 1.0.0)"
79+
continue
80+
fi
81+
82+
# Validate >= last version
83+
if ! version_gte "$VERSION_NUMBER" "$LAST_VERSION"; then
84+
echo "Error: Version must be >= $LAST_VERSION"
85+
continue
86+
fi
87+
88+
break
89+
done
90+
91+
# Update .build_version
92+
echo "$VERSION_NUMBER" > "$VERSION_FILE"
93+
94+
APP_VERSION="APP-$VERSION_NUMBER"
95+
FILE_TAG="$VERSION_NUMBER"
96+
else
97+
# Dev build - prompt for target version
98+
while true; do
99+
read -p "Enter target version [$LAST_VERSION]: " VERSION_NUMBER
100+
VERSION_NUMBER=${VERSION_NUMBER:-$LAST_VERSION}
101+
102+
# Validate semver format
103+
if ! [[ "$VERSION_NUMBER" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
104+
echo "Error: Version must be in X.Y.Z format (e.g. 1.0.0)"
105+
continue
106+
fi
107+
108+
# Validate >= last version
109+
if ! version_gte "$VERSION_NUMBER" "$LAST_VERSION"; then
110+
echo "Error: Version must be >= $LAST_VERSION"
111+
continue
112+
fi
113+
114+
break
115+
done
116+
117+
# Update .build_version
118+
echo "$VERSION_NUMBER" > "$VERSION_FILE"
119+
120+
APP_VERSION="APP-$EPOCH"
121+
FILE_TAG="$EPOCH"
122+
fi
123+
124+
# Output directories
125+
ANDROID_DIR="$HOME/Documents/MeshMapper_Apps/Andriod"
126+
IOS_DIR="$HOME/Documents/MeshMapper_Apps/IOS"
127+
128+
echo ""
129+
echo "============================================"
130+
echo "MeshMapper Build Script"
131+
echo "Version: $APP_VERSION"
132+
echo "Build number: $EPOCH"
133+
echo "============================================"
134+
echo ""
135+
136+
# Ensure output directories exist
137+
mkdir -p "$ANDROID_DIR"
138+
mkdir -p "$IOS_DIR"
139+
140+
# Build Android APK
141+
echo "[1/3] Building Android APK..."
142+
flutter build apk --release --build-name="$VERSION_NUMBER" --build-number="$EPOCH" --dart-define="APP_VERSION=$APP_VERSION" --dart-define="API_KEY=$MESHMAPPER_API_KEY"
143+
cp build/app/outputs/flutter-apk/app-release.apk "$ANDROID_DIR/MeshMapper-$FILE_TAG.apk"
144+
echo "✓ Built: MeshMapper-$FILE_TAG.apk"
145+
echo ""
146+
147+
# Build Android AAB
148+
echo "[2/3] Building Android AAB..."
149+
flutter build appbundle --release --build-name="$VERSION_NUMBER" --build-number="$EPOCH" --dart-define="APP_VERSION=$APP_VERSION" --dart-define="API_KEY=$MESHMAPPER_API_KEY"
150+
cp build/app/outputs/bundle/release/app-release.aab "$ANDROID_DIR/MeshMapper-$FILE_TAG.aab"
151+
echo "✓ Built: MeshMapper-$FILE_TAG.aab"
152+
echo ""
153+
154+
# Build iOS IPA
155+
echo "[3/3] Building iOS IPA..."
156+
flutter build ipa --release --build-name="$VERSION_NUMBER" --build-number="$EPOCH" --dart-define="APP_VERSION=$APP_VERSION" --dart-define="API_KEY=$MESHMAPPER_API_KEY"
157+
cp build/ios/ipa/mesh_mapper.ipa "$IOS_DIR/MeshMapper-$FILE_TAG.ipa"
158+
echo "✓ Built: MeshMapper-$FILE_TAG.ipa"
159+
echo ""
160+
161+
echo "============================================"
162+
echo "Build Complete!"
163+
echo "Version: $APP_VERSION"
164+
echo "Build number: $EPOCH"
165+
echo ""
166+
echo "Outputs:"
167+
echo " APK: $ANDROID_DIR/MeshMapper-$FILE_TAG.apk"
168+
echo " AAB: $ANDROID_DIR/MeshMapper-$FILE_TAG.aab"
169+
echo " IPA: $IOS_DIR/MeshMapper-$FILE_TAG.ipa"
170+
echo "============================================"

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
wd.meshmapper.net

0 commit comments

Comments
 (0)