Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cech12 committed Jul 26, 2018
2 parents 8503c88 + 6c446cf commit 053efc1
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 47 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
language: csharp
solution: DigglesModManager.sln
2 changes: 0 additions & 2 deletions ClassDiagram1.cd

This file was deleted.

68 changes: 36 additions & 32 deletions DevTools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,24 @@ Clones all Mod-Repositories from github to your computer. The source for the rep
Provide a path to clone the repositories to a given directory.

## get-all-statuses.sh
Checks the status of Mod-Repositories on your computer. (basically foreach \[git status\]) The source for the repo-names is `mod-names.txt`.
Checks the status of Mod-Repositories on your computer (basically foreach \[git status\]). The shell has to be inside of the DigglesMods-directory.

`./get-all-statuses.sh [PATH]`

Provide a path to check the repos in the given directory. In the given path has to be several directories with valid git-repositories.
```bash
cd DigglesMods
../DevTools/get-all-statuses.sh
```

### Example:
- you are here
- root
- DevTools
- Mods
- DigglesMods <-- you are here
- Barrow
- Rimless
- ..
- StoneDoor

```bash
> DevTools/get-all-statuses.sh Mods/
> ../DevTools/get-all-statuses.sh
Show status of all mods? Are you sure? (y/n) y
On branch master
Your branch is up-to-date with 'origin/master'.
Expand All @@ -52,31 +53,7 @@ nothing to commit, working directory clean
## release.sh
This script automates the release-process to make it less error-prone.

### Release-Steps

1. Gather all Mods.
- If the mods are checked out using git, make sure the .git-directories are deleted.
2. Gather all necessary binaries.
3. Zip a folder with the following files and name it DigglesModManager-VERSION.zip
- Mods
- ..
- DigglesModManager.exe
- \*.dll..
4. Adjust the version in Properties/AssemblyInfo.cs. The version consists of two numbers: The major and minor version: `[assembly: AssemblyVersion("major.minor.*")]` The `*` is a .NET-constant which functions as a placeholder for the build-number. The build-number is generated automatically by Visual Studio. Version 1.0 would look like this: `[assembly: AssemblyVersion("1.0.*")]`
5. Commit version change to version-control:
```bash
git add Properties/AssemblyInfo.cs
git commit -m "release version x.y and stepped up to x.(y+1)" #REPLACE VERSION
git pull
git push
```
6. Release zip-package in github.
- https://github.com/DigglesMods/DigglesModManager/releases/new
- Describe the release-changes
- Give it a title like 'DigglesModManager v1.0'
- Don't forget to provide the zip-file!

###Usage
### Usage

1. Build the DigglesModProject using Visual Studio in Release-mode (Solution configuration).
2. Make sure there is a file `github.token` in the same directory as `release.sh`. It must contain a valid github-token for your account. This token is used to make the new release-package public on github. (https://help.github.com/articles/creating-an-access-token-for-command-line-use/)
Expand All @@ -90,6 +67,7 @@ This script automates the release-process to make it less error-prone.
- To reset the working files, completely delete the bin/Release folder and rebuild using Visual Studio (#1.)
- The file `github.token` must not contain any other letters or line breaks except the one line with the github-token.
- Any files which are read by `release.sh` must not contain only one line with comma-separated and trimmed strings.
- You can revert the relese by visiting https://github.com/DigglesMods/DigglesModManager/releases, clicking the wrong release and click 'Delete'

### Dependencies
The release-script uses 7zip and github-release to automate all necessary release steps. 7zip is used to pack several files to a zip-archive. github-release(.exe) is used to automatically provide a new release on github using the commandline.
Expand All @@ -102,5 +80,31 @@ Used command:
Used command:
`DevTools/github-release/github-release.exe DigglesMods/DigglesModManager DigglesModManager-v$VERSION master "$DESCRIPTION" $ZIPFILE`

### Release-Steps

What is the release-script doing?

1. Gather all Mods.
- If the mods are checked out using git, make sure the .git-directories are deleted.
2. Gather all necessary binaries.
3. Zip a folder with the following files and name it DigglesModManager-VERSION.zip
- Mods
- ..
- DigglesModManager.exe
- \*.dll..
4. Adjust the version in Properties/AssemblyInfo.cs. The version consists of two numbers: The major and minor version: `[assembly: AssemblyVersion("major.minor.*")]` The `*` is a .NET-constant which functions as a placeholder for the build-number. The build-number is generated automatically by Visual Studio. Version 1.0 would look like this: `[assembly: AssemblyVersion("1.0.*")]`
5. Commit version change to version-control:
```bash
git add Properties/AssemblyInfo.cs
git commit -m "release version x.y and stepped up to x.(y+1)" #REPLACE VERSION
git pull
git push
```
6. Release zip-package in github.
- https://github.com/DigglesMods/DigglesModManager/releases/new
- Describe the release-changes
- Give it a title like 'DigglesModManager v1.0'
- Don't forget to provide the zip-file!



10 changes: 4 additions & 6 deletions DevTools/clone-all-mods.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ if ! [[ -d "$dir" ]]; then
fi
fi
fi


SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#all currently available mods (read from mod-names.txt)
IFS=$',' read -d '' -r -a repoNames < $SCRIPT_DIR/mod-names.txt

if [ -d "$dir" ] ; then
cd "$dir" #change to the directory provided (relative to the script)
read -p "Cloning all mods into '$(pwd)' Are you sure? (y/n) " -r
Expand All @@ -24,9 +27,6 @@ if [ -d "$dir" ] ; then

## all repo names
declare -a repoBase="https://github.com/DigglesMods"
declare -a repoNames=("BetterStorage" "Barrow" "Rimless" "PowerPotion" "ProductionStatistics"
"CommandF9" "DwarfStatistics" "SwitcherGeneratorDungeon" "RareResources"
"DroppingResources" "ChangeGameSettings" "BugFix" "StoneDoor" "WigSound")

## clone every repo
for repo in "${repoNames[@]}"
Expand All @@ -45,5 +45,3 @@ if [ -d "$dir" ] ; then
else
echo "The chosen path is not a directory! Aborted."
fi


10 changes: 4 additions & 6 deletions DevTools/get-all-statuses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@
read -p "Show status of all mods? Are you sure? (y/n) " -r
if [[ $REPLY =~ ^[Yy]$ ]]
then
## all repo names
declare -a repoNames=("BetterStorage" "Barrow" "Rimless" "PowerPotion" "ProductionStatistics"
"CommandF9" "DwarfStatistics" "SwitcherGeneratorDungeon" "RareResources"
"DroppingResources" "ChangeGameSettings" "BugFix" "StoneDoor" "WigSound")
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#all currently available mods (read from mod-names.txt)
IFS=$',' read -d '' -r -a repoNames < $SCRIPT_DIR/mod-names.txt

## iterte over every repo
for repo in "${repoNames[@]}"
do
if [ -d "$repo" ]; then
echo "Checking '$repo'"
cd $repo
git status
cd ..
fi
done
fi


2 changes: 1 addition & 1 deletion DevTools/mod-names.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BetterStorage,Barrow,Rimless,PowerPotion,ProductionStatistics,CommandF9,DwarfStatistics,SwitcherGeneratorDungeon,RareResources,DroppingResources,ChangeGameSettings,BugFix,StoneDoor
BetterStorage,Barrow,Rimless,PowerPotion,ProductionStatistics,CommandF9,DwarfStatistics,SwitcherGeneratorDungeon,RareResources,DroppingResources,ChangeGameSettings,BugFix,StoneDoor,WigSound
6 changes: 6 additions & 0 deletions DigglesModManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
<EmbeddedResource Include="ToolTipListBox.resx">
<DependentUpon>ToolTipListBox.cs</DependentUpon>
</EmbeddedResource>
<None Include="LICENSE">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
Expand All @@ -129,6 +132,9 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="README.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config">
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[![Build Status](https://travis-ci.org/DigglesMods/DigglesModManager.svg?branch=master)](https://travis-ci.org/DigglesMods/DigglesModManager)
[![Software License](https://img.shields.io/badge/license-GPL3-brightgreen.svg?style=flat-square)](LICENSE)

# DigglesModManager
This tool helps you to mod the game "Diggles - The Myth of Fenris" (ger: Wiggles).

0 comments on commit 053efc1

Please sign in to comment.