List of commits:
Subject Hash Author Date (UTC)
Implement `exe` command. 1eaa36242201cf7ade5f23a14340e630c267db07 Jan Allersma 2018-12-11 13:23:32
Implement `run` and `build` commands. 14e9e25b6a06f587c1a50829e72c829ae59a87c2 Jan Allersma 2018-12-10 20:57:08
Implement non-recursive dependency check. 5ffd40604755d1c2dde9353c74f06a006deea33c Jan Allersma 2018-12-07 20:50:42
Restructure project. c2d98caf7897e87284fb2891e1d4b92d14cf37e1 Jan Allersma 2018-12-06 16:20:46
Initial commit. 4c152d55edc20ac55fd749a2b32b204134a664e3 Jan Allersma 2018-12-05 17:03:08
Commit 1eaa36242201cf7ade5f23a14340e630c267db07 - Implement `exe` command.
Author: Jan Allersma
Author date (UTC): 2018-12-11 13:23
Committer name: Jan Allersma
Committer date (UTC): 2018-12-11 13:23
Parent(s): 14e9e25b6a06f587c1a50829e72c829ae59a87c2
Signing key:
Tree: fa664d66b206d4acb1a20a65a4fad72dc643595b
File Lines added Lines deleted
src/backend/project.rs 13 9
src/main.rs 6 0
File src/backend/project.rs changed (mode: 100644) (index 8640ea4..c772de1)
... ... pub fn build() -> Result<String, String> {
22 22 } }
23 23 } }
24 24
25 pub fn run(args: &mut env::Args) -> Result<String, String> {
25 pub fn exe(args: &mut env::Args) -> Result<String, String> {
26 26 let output_dir; let output_dir;
27 27 let mut args = String::new(); let mut args = String::new();
28 28
29 println!("Building project..");
30
31 match build() {
32 Ok(output) => println!("{}", output),
33 Err(e) => return Err(e)
34 }
35
36 29 match super::filesystem::get_project_root() { match super::filesystem::get_project_root() {
37 30 Some(dir) => output_dir = dir, Some(dir) => output_dir = dir,
38 31 None => return Err(String::from("not in a project (sub)directory.")) None => return Err(String::from("not in a project (sub)directory."))
 
... ... pub fn run(args: &mut env::Args) -> Result<String, String> {
79 72 } }
80 73 } }
81 74
75 pub fn run(args: &mut env::Args) -> Result<String, String> {
76 println!("Building project..");
77
78 match build() {
79 Ok(output) => println!("{}", output),
80 Err(e) => return Err(e)
81 }
82
83 exe(args)
84 }
85
82 86 pub fn help() { pub fn help() {
83 87 println!("Syntax:"); println!("Syntax:");
84 88 println!("$ beheer [FLAG] [COMMAND [ARGUMENTS]]"); println!("$ beheer [FLAG] [COMMAND [ARGUMENTS]]");
 
... ... pub fn help() {
90 94 println!("init [DIRECTORY]\tInitialize new project in specified directory. Defaults to current directory."); println!("init [DIRECTORY]\tInitialize new project in specified directory. Defaults to current directory.");
91 95 println!("build\t\t\tBuild current project."); println!("build\t\t\tBuild current project.");
92 96 println!("run [ARGUMENTS]\t\tBuild and run current project with ARGUMENTS to run project with."); println!("run [ARGUMENTS]\t\tBuild and run current project with ARGUMENTS to run project with.");
93 println!("exe\t\t\tRun current project without building.", );
97 println!("exe [ARGUMENTS]\t\tRun current project with ARGUMENTS. The project won't be built.");
94 98 } }
File src/main.rs changed (mode: 100644) (index fa8f0d6..a1a3bd1)
... ... fn parse() {
38 38 Err(e) => println!("Running project failed: {}", e) Err(e) => println!("Running project failed: {}", e)
39 39 } }
40 40 } }
41 else if &argument == "exe" {
42 match backend::project::exe(&mut argv) {
43 Ok(_) => {},
44 Err(e) => println!("Running project failed: {}", e)
45 }
46 }
41 47 }, },
42 48 None => backend::project::help() None => backend::project::help()
43 49 } }
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/kapstok/NHL-Beheer

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/kapstok/NHL-Beheer

Clone this repository using git:
git clone git://git.rocketgit.com/user/kapstok/NHL-Beheer

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main