-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy.sh
More file actions
55 lines (43 loc) · 1.74 KB
/
deploy.sh
File metadata and controls
55 lines (43 loc) · 1.74 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# deploy.sh für NonlinearOptimizationTestFunctions.jl
set -e # Skript bei Fehler abbrechen
echo "=== Deploy-Skript gestartet ==="
# --- 1. Alle lokalen Änderungen committen und pushen ---
echo "Staging aller Änderungen..."
git add -A
echo "Committen der Änderungen..."
if git diff --quiet --staged; then
echo "Keine Änderungen zum Committen."
else
git commit -m "Deploy: Update code and documentation"
echo "Änderungen committet."
fi
echo "Pushen zum master-Branch..."
git push origin master
# --- 2. Optional: Neuen Version-Tag erstellen und pushen ---
read -p "Neuen Version-Tag erstellen (z.B. v0.1.1) oder Enter zum Überspringen: " TAG
if [ ! -z "$TAG" ]; then
echo "Erstelle Tag $TAG..."
git tag -a "$TAG" -m "Release $TAG"
git push origin "$TAG"
echo "Tag $TAG erfolgreich gepusht."
else
echo "Kein Tag erstellt – übersprungen."
fi
echo "Source code & tag deployed"
# --- 3. Dokumentation bauen & deployen ---
echo "Building and deploying documentation..."
# Aggressive Reinigung gegen Pkg-Probleme (MethodError, Caching etc.)
echo "Performing hard Pkg reset: Deleting Manifest.toml files..."
rm -f Manifest.toml
rm -f docs/Manifest.toml
echo "Pkg.instantiate() im docs-Projekt..."
julia --project=docs -e 'using Pkg; Pkg.instantiate()'
echo "Starte make.jl → baut Docs und deployt via deploydocs()..."
julia --project=docs docs/make.jl
echo "=== Deployment abgeschlossen! ==="
echo "Die Dokumentation sollte in wenigen Minuten live sein unter:"
echo "https://uwealex.github.io/NonlinearOptimizationTestFunctions.jl/"
echo ""
echo "Stable-Version: https://uwealex.github.io/NonlinearOptimizationTestFunctions.jl/stable"
echo "Dev-Version: https://uwealex.github.io/NonlinearOptimizationTestFunctions.jl/dev"